當前位置: 首頁>>代碼示例>>C#>>正文


C# ScintillaControl.MarkerAdd方法代碼示例

本文整理匯總了C#中ScintillaNet.ScintillaControl.MarkerAdd方法的典型用法代碼示例。如果您正苦於以下問題:C# ScintillaControl.MarkerAdd方法的具體用法?C# ScintillaControl.MarkerAdd怎麽用?C# ScintillaControl.MarkerAdd使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ScintillaNet.ScintillaControl的用法示例。


在下文中一共展示了ScintillaControl.MarkerAdd方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ToggleMarker

 /// <summary>
 /// Adds or removes a marker
 /// </summary>
 public static void ToggleMarker(ScintillaControl sci, Int32 marker, Int32 line)
 {
     Int32 lineMask = sci.MarkerGet(line);
     if ((lineMask & GetMarkerMask(marker)) == 0) sci.MarkerAdd(line, marker);
     else sci.MarkerDelete(line, marker);
     UITools.Manager.MarkerChanged(sci, line);
 }
開發者ID:heon21st,項目名稱:flashdevelop,代碼行數:10,代碼來源:MarkerManager.cs

示例2: BookmarkMatches

 /// <summary>
 /// Bookmarks a search match
 /// </summary>
 public static void BookmarkMatches(ScintillaControl sci, List<SearchMatch> matches)
 {
     for (Int32 i = 0; i < matches.Count; i++)
     {
         Int32 line = matches[i].Line - 1;
         sci.EnsureVisible(line);
         sci.MarkerAdd(line, 0);
     }
 }
開發者ID:ImaginationSydney,項目名稱:flashdevelop,代碼行數:12,代碼來源:FRDialogGenerics.cs

示例3: ApplyStateObject

 /// <summary>
 /// Applies the state object to a scintilla control
 /// </summary>
 private static void ApplyStateObject(ScintillaControl sci, StateObject so, Boolean restorePosition)
 {
     if (so.LineCount != sci.LineCount) return;
     sci.Refresh(); // Update the scintilla control state
     for (Int32 i = 0; i < so.FoldedLines.Count; i++)
     {
         Int32 foldedLine = so.FoldedLines[i];
         sci.ToggleFold(foldedLine);
     }
     if (so.BookmarkedLines != null)
     {
         for (Int32 i = 0; i < so.BookmarkedLines.Count; i++)
         {
             Int32 bookmarkedLine = so.BookmarkedLines[i];
             sci.MarkerAdd(bookmarkedLine, 0);
         }
         sci.Refresh(); // Update again
     }
     if (restorePosition)
     {
         sci.FirstVisibleLine = so.LineScroll;
         Int32 line = sci.LineFromPosition(so.Position);
         sci.SetSel(so.Position, so.Position);
         sci.EnsureVisible(line);
     }
 }
開發者ID:xeronith,項目名稱:flashdevelop,代碼行數:29,代碼來源:FileStateManager.cs

示例4: OnScintillaControlModified

 /// <summary>
 /// Handles the modified event
 /// </summary>
 public void OnScintillaControlModified(ScintillaControl sender, Int32 pos, Int32 modType, String text, Int32 length, Int32 lAdded, Int32 line, Int32 fLevelNow, Int32 fLevelPrev)
 {
     ITabbedDocument document = DocumentManager.FindDocument(sender);
     if (document != null && document.IsEditable)
     {
         this.OnDocumentModify(document);
         if (this.appSettings.ViewModifiedLines)
         {
             Int32 flags = sender.ModEventMask;
             sender.ModEventMask = flags & ~(Int32)ScintillaNet.Enums.ModificationFlags.ChangeMarker;
             Int32 modLine = sender.LineFromPosition(pos);
             sender.MarkerAdd(modLine, 2);
             for (Int32 i = 0; i <= lAdded; i++)
             {
                 sender.MarkerAdd(modLine + i, 2);
             }
             sender.ModEventMask = flags;
         }
     }
 }
開發者ID:heon21st,項目名稱:flashdevelop,代碼行數:23,代碼來源:MainForm.cs

示例5: SciControl_MarginClick

 /// <summary>
 /// 
 /// </summary>
 static public void SciControl_MarginClick(ScintillaControl sender, int modifiers, int position, int margin)
 {
     if (margin != 0) return;
     //if (PluginMain.debugManager.FlashInterface.isDebuggerStarted && !PluginMain.debugManager.FlashInterface.isDebuggerSuspended) return;
     int line = sender.LineFromPosition(position);
     if (IsMarkerSet(sender, markerBPEnabled, line))
     {
         sender.MarkerDelete(line, markerBPEnabled);
     }
     else
     {
         if (IsMarkerSet(sender, markerBPDisabled, line)) sender.MarkerDelete(line, markerBPDisabled);
         sender.MarkerAdd(line, markerBPEnabled);
     }
 }
開發者ID:ImaginationSydney,項目名稱:flashdevelop,代碼行數:18,代碼來源:ScintillaHelper.cs

示例6: ToggleMarker

 /// <summary>
 /// Adds or removes a marker
 /// </summary>
 public static void ToggleMarker(ScintillaControl sci, Int32 marker, Int32 line)
 {
     if (!HasMarker(sci, marker, line)) sci.MarkerAdd(line, marker);
     else sci.MarkerDelete(line, marker);
     UITools.Manager.MarkerChanged(sci, line);
 }
開發者ID:xeronith,項目名稱:flashdevelop,代碼行數:9,代碼來源:MarkerManager.cs

示例7: AddHighlights

        /// <summary>
        /// Adds highlights to the correct sci control
        /// </summary>
        private void AddHighlights(ScintillaControl sci, List<SearchMatch> matches)
        {
            if (matches == null)
            {
                return;
            }

            foreach (SearchMatch match in matches)
            {
                Int32 start = sci.MBSafePosition(match.Index);
                Int32 end = start + sci.MBSafeTextLength(match.Value);
                Int32 line = sci.LineFromPosition(start);
                Int32 position = start;
                Int32 es = sci.EndStyled;
                Int32 mask = 1 << sci.StyleBits;

                sci.SetIndicStyle(0, (Int32)ScintillaNet.Enums.IndicatorStyle.RoundBox);
                sci.SetIndicFore(0, DataConverter.ColorToInt32(this.settingObject.highlightColor));
                sci.StartStyling(position, mask);
                sci.SetStyling(end - start, mask);
                sci.StartStyling(es, mask - 1);

                if (this.settingObject.addLineMarker)
                {
                    sci.MarkerAdd(line, 2);
                    sci.MarkerSetBack(2, DataConverter.ColorToInt32(this.settingObject.highlightColor));
                }
            }
        }
開發者ID:fordream,項目名稱:wanghe-project,代碼行數:32,代碼來源:PluginMain.cs

示例8: AddHighlights

 /// <summary>
 /// Adds highlights to the correct sci control
 /// </summary>
 private void AddHighlights(ScintillaControl sci, List<SearchMatch> matches)
 {
     if (matches == null) return;
     int style = (int)settings.HighlightStyle;
     int color = DataConverter.ColorToInt32(settings.HighlightColor);
     if (settings.HighlightUnderCursorEnabled && prevResult != null)
     {
         if (prevResult.IsPackage) color = DataConverter.ColorToInt32(settings.PackageColor);
         else
         {
             FlagType flags;
             if (prevResult.Type != null && prevResult.Member == null)
             {
                 flags = prevResult.Type.Flags;
                 if ((flags & FlagType.Abstract) > 0) color = DataConverter.ColorToInt32(settings.AbstractColor);
                 else if ((flags & FlagType.TypeDef) > 0) color = DataConverter.ColorToInt32(settings.TypeDefColor);
                 else if ((flags & FlagType.Enum) > 0) color = DataConverter.ColorToInt32(settings.EnumColor);
                 else if ((flags & FlagType.Class) > 0) color = DataConverter.ColorToInt32(settings.ClassColor);
             }
             else if (prevResult.Member != null)
             {
                 flags = prevResult.Member.Flags;
                 if ((flags & FlagType.Constant) > 0) color = DataConverter.ColorToInt32(settings.ConstantColor);
                 else if ((flags & FlagType.ParameterVar) > 0) color = DataConverter.ColorToInt32(settings.MemberFunctionColor);
                 else if ((flags & FlagType.LocalVar) > 0) color = DataConverter.ColorToInt32(settings.LocalVariableColor);
                 else if ((flags & FlagType.Static) == 0)
                 {
                     if ((flags & FlagType.Variable) > 0) color = DataConverter.ColorToInt32(settings.VariableColor);
                     else if ((flags & (FlagType.Setter | FlagType.Getter)) > 0) color = DataConverter.ColorToInt32(settings.AccessorColor);
                     else if ((flags & FlagType.Function) > 0) color = DataConverter.ColorToInt32(settings.MethodColor);
                 }
                 else
                 {
                     if ((flags & FlagType.Variable) > 0) color = DataConverter.ColorToInt32(settings.StaticVariableColor);
                     else if ((flags & (FlagType.Setter | FlagType.Getter)) > 0) color = DataConverter.ColorToInt32(settings.StaticAccessorColor);
                     else if ((flags & FlagType.Function) > 0) color = DataConverter.ColorToInt32(settings.StaticMethodColor);
                 }
             }
         }
     }
     int es = sci.EndStyled;
     int mask = 1 << sci.StyleBits;
     bool addLineMarker = settings.AddLineMarker;
     foreach (SearchMatch match in matches)
     {
         int start = sci.MBSafePosition(match.Index);
         int end = start + sci.MBSafeTextLength(match.Value);
         int line = sci.LineFromPosition(start);
         int position = start;
         sci.SetIndicStyle(0, style);
         sci.SetIndicFore(0, color);
         sci.StartStyling(position, mask);
         sci.SetStyling(end - start, mask);
         sci.StartStyling(es, mask - 1);
         if (addLineMarker)
         {
             sci.MarkerAdd(line, MARKER_NUMBER);
             sci.MarkerSetBack(MARKER_NUMBER, color);
         }
     }
     prevPos = sci.CurrentPos;
 }
開發者ID:nujond,項目名稱:fd-highlight-selected-plugin,代碼行數:65,代碼來源:PluginMain.cs


注:本文中的ScintillaNet.ScintillaControl.MarkerAdd方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。