当前位置: 首页>>代码示例>>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;未经允许,请勿转载。