本文整理汇总了C#中ScintillaNet.ScintillaControl类的典型用法代码示例。如果您正苦于以下问题:C# ScintillaControl类的具体用法?C# ScintillaControl怎么用?C# ScintillaControl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ScintillaControl类属于ScintillaNet命名空间,在下文中一共展示了ScintillaControl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SciControl_MarkerChanged
/// <summary>
///
/// </summary>
static public void SciControl_MarkerChanged(ScintillaControl sender, Int32 line)
{
if (line < 0) return;
Boolean bCurrentLine = IsMarkerSet(sender, markerCurrentLine, line);
Boolean bBpActive = IsMarkerSet(sender, markerBPEnabled, line);
Boolean bBpDisabled = IsMarkerSet(sender, markerBPDisabled, line);
if (bCurrentLine)
{
ScintillaHelper.RemoveHighlight(sender, line, indicatorDebugDisabledBreakpoint);
ScintillaHelper.RemoveHighlight(sender, line, indicatorDebugEnabledBreakpoint);
ScintillaHelper.AddHighlight(sender, line, indicatorDebugCurrentLine, 1);
}
else if (bBpActive)
{
ScintillaHelper.RemoveHighlight(sender, line, indicatorDebugCurrentLine);
ScintillaHelper.RemoveHighlight(sender, line, indicatorDebugDisabledBreakpoint);
ScintillaHelper.AddHighlight(sender, line, indicatorDebugEnabledBreakpoint, 1);
}
else if (bBpDisabled)
{
ScintillaHelper.RemoveHighlight(sender, line, indicatorDebugCurrentLine);
ScintillaHelper.RemoveHighlight(sender, line, indicatorDebugEnabledBreakpoint);
ScintillaHelper.AddHighlight(sender, line, indicatorDebugDisabledBreakpoint, 1);
}
else
{
ScintillaHelper.RemoveHighlight(sender, line, indicatorDebugCurrentLine);
ScintillaHelper.RemoveHighlight(sender, line, indicatorDebugDisabledBreakpoint);
ScintillaHelper.RemoveHighlight(sender, line, indicatorDebugEnabledBreakpoint);
}
PluginMain.breakPointManager.SetBreakPointInfo(sender.FileName, line, !(bBpActive || bBpDisabled), bBpActive);
}
示例2: PreviousMarker
/// <summary>
/// Moves the cursor to the previous marker
/// </summary>
public static void PreviousMarker(ScintillaControl sci, Int32 marker, Int32 line)
{
Int32 prev = 0; Int32 count = 0;
Int32 lineMask = sci.MarkerGet(line);
if ((lineMask & GetMarkerMask(marker)) != 0)
{
prev = sci.MarkerPrevious(line - 1, GetMarkerMask(marker));
if (prev != -1) sci.GotoLine(prev);
else
{
count = sci.LineCount;
prev = sci.MarkerPrevious(count, GetMarkerMask(marker));
if (prev != -1) sci.GotoLine(prev);
}
}
else
{
prev = sci.MarkerPrevious(line, GetMarkerMask(marker));
if (prev != -1) sci.GotoLine(prev);
else
{
count = sci.LineCount;
prev = sci.MarkerPrevious(count, GetMarkerMask(marker));
if (prev != -1) sci.GotoLine(prev);
}
}
}
示例3: 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);
}
示例4: HandleGeneratorCompletion
static public bool HandleGeneratorCompletion(ScintillaControl Sci, bool autoHide, string word)
{
ContextFeatures features = ASContext.Context.Features;
if (features.overrideKey != null && word == features.overrideKey)
return HandleOverrideCompletion(Sci, autoHide);
return false;
}
示例5: NextMarker
/// <summary>
/// Moves the cursor to the next marker
/// </summary>
public static void NextMarker(ScintillaControl sci, Int32 marker, Int32 line)
{
Int32 next = 0;
Int32 lineMask = sci.MarkerGet(line);
if ((lineMask & GetMarkerMask(marker)) != 0)
{
next = sci.MarkerNext(line + 1, GetMarkerMask(marker));
if (next != -1) sci.GotoLine(next);
else
{
next = sci.MarkerNext(0, GetMarkerMask(marker));
if (next != -1) sci.GotoLine(next);
}
}
else
{
next = sci.MarkerNext(line, GetMarkerMask(marker));
if (next != -1) sci.GotoLine(next);
else
{
next = sci.MarkerNext(0, GetMarkerMask(marker));
if (next != -1) sci.GotoLine(next);
}
}
}
示例6: AddHighlight
/// <summary>
///
/// </summary>
public static void AddHighlight(ScintillaControl sci, Int32 line, Int32 indicator, Int32 value)
{
Int32 start = sci.PositionFromLine(line);
Int32 length = sci.LineLength(line);
if (start < 0 || length < 1)
{
return;
}
// Remember previous EndStyled marker and restore it when we are done.
Int32 es = sci.EndStyled;
// Mask for style bits used for restore.
Int32 mask = (1 << sci.StyleBits) - 1;
Language lang = PluginBase.MainForm.SciConfig.GetLanguage(sci.ConfigurationLanguage);
if (indicator == indicatorDebugCurrentLine)
{
sci.SetIndicFore(indicator, lang.editorstyle.DebugLineBack);
}
else if (indicator == indicatorDebugEnabledBreakpoint)
{
sci.SetIndicFore(indicator, lang.editorstyle.ErrorLineBack);
}
else if (indicator == indicatorDebugDisabledBreakpoint)
{
sci.SetIndicFore(indicator, lang.editorstyle.DisabledLineBack);
}
sci.SetIndicStyle(indicator, 7);
sci.CurrentIndicator = indicator;
sci.IndicatorValue = value;
sci.IndicatorFillRange(start, length);
sci.StartStyling(es, mask);
}
示例7: RemoveHighlights
// <summary>
/// Removes the highlights from the correct sci control
/// </summary>
public static void RemoveHighlights(ScintillaControl sci)
{
Int32 es = sci.EndStyled;
Int32 mask = (1 << sci.StyleBits);
sci.StartStyling(0, mask);
sci.SetStyling(sci.TextLength, 0);
sci.StartStyling(es, mask - 1);
}
示例8: CodePreview
public CodePreview(ScintillaControl sci)
{
this.Sci = sci;
this.Editor = new ScintillaControl();
InitializeControls();
SetupEditor();
}
示例9: TraceMethod
private static void TraceMethod(ScintillaControl sci, string name)
{
SkipMethod(sci);
sci.NewLine();
sci.InsertText(sci.CurrentPos, String.Format("trace(\"{0}()\");", name));
sci.LineEnd();
}
示例10: SciControl_MarkerChanged
/// <summary>
///
/// </summary>
static public void SciControl_MarkerChanged(ScintillaControl sender, Int32 line)
{
if (line < 0) return;
ITabbedDocument document = DocumentManager.FindDocument(sender);
if (document == null || !document.IsEditable) return;
ApplyHighlights(document.SplitSci1, line, true);
ApplyHighlights(document.SplitSci2, line, false);
}
示例11: SelectMatch
/// <summary>
/// Selects a search match
/// </summary>
public static void SelectMatch(ScintillaControl sci, SearchMatch match)
{
Int32 start = sci.MBSafePosition(match.Index); // wchar to byte position
Int32 end = start + sci.MBSafeTextLength(match.Value); // wchar to byte text length
Int32 line = sci.LineFromPosition(start);
sci.EnsureVisible(line);
sci.SetSel(start, end);
}
示例12: sci_Modified
static public void sci_Modified(ScintillaControl sender, int position, int modificationType, string text, int length, int linesAdded, int line, int foldLevelNow, int foldLevelPrev)
{
if (linesAdded != 0)
{
int modline = sender.LineFromPosition(position);
PluginMain.breakPointManager.UpdateBreakPoint(sender.FileName, modline, linesAdded);
}
}
示例13: HaXeCompletion
public HaXeCompletion(ScintillaControl sci, ASExpr expr, bool autoHide, IHaxeCompletionHandler handler)
{
this.sci = sci;
this.expr = expr;
this.autoHide = autoHide;
this.handler = handler;
tips = new ArrayList();
nbErrors = 0;
}
示例14: 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);
}
}
示例15: HaxeComplete
public HaxeComplete(ScintillaControl sci, ASExpr expr, bool autoHide, IHaxeCompletionHandler completionHandler)
{
Sci = sci;
Expr = expr;
AutoHide = autoHide;
handler = completionHandler;
Status = HaxeCompleteStatus.NONE;
FileName = PluginBase.MainForm.CurrentDocument.FileName;
}