本文整理匯總了C#中ScintillaNet.ScintillaControl.IndicatorClearRange方法的典型用法代碼示例。如果您正苦於以下問題:C# ScintillaControl.IndicatorClearRange方法的具體用法?C# ScintillaControl.IndicatorClearRange怎麽用?C# ScintillaControl.IndicatorClearRange使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ScintillaNet.ScintillaControl
的用法示例。
在下文中一共展示了ScintillaControl.IndicatorClearRange方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: RemoveAllHighlights
/// <summary>
///
/// </summary>
public static void RemoveAllHighlights(ScintillaControl sci)
{
if (sci == null) return;
Int32 es = sci.EndStyled;
Int32[] indics = new Int32[] { indicatorDebugCurrentLine, indicatorDebugDisabledBreakpoint, indicatorDebugEnabledBreakpoint };
foreach (Int32 indicator in indics)
{
sci.CurrentIndicator = indicator;
for (int position = 0; position < sci.Length;)
{
Int32 start = sci.IndicatorStart(indicator, position);
Int32 end = sci.IndicatorEnd(indicator, start);
Int32 length = end - start;
if (length > 0)
{
sci.IndicatorClearRange(start, length);
position = start + length + 1;
}
else break;
}
}
sci.StartStyling(es, (1 << sci.StyleBits) - 1);
}
示例2: RemoveHighlight
/// <summary>
///
/// </summary>
static public void RemoveHighlight(ScintillaControl sci, Int32 line, Int32 indicator)
{
if (sci == null) return;
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.IndicatorClearRange(start, length);
sci.StartStyling(es, mask);
}
示例3: RemoveHighlight
/// <summary>
///
/// </summary>
public static void RemoveHighlight(ScintillaControl sci, Int32 line, Int32 indicator)
{
if (sci == null) return;
Int32 start = sci.PositionFromLine(line);
Int32 length = sci.LineLength(line);
if (start < 0 || length < 1) return;
Int32 es = sci.EndStyled;
Int32 mask = (1 << sci.StyleBits) - 1;
Language lang = PluginBase.MainForm.SciConfig.GetLanguage(sci.ConfigurationLanguage);
if (indicator == indicatorDebugCurrentLine)
{
sci.SetIndicFore(indicator, lang.editorstyle.DebugLineBack);
sci.SetIndicSetAlpha(indicator, 40); // Improve contrast
}
else if (indicator == indicatorDebugEnabledBreakpoint)
{
sci.SetIndicFore(indicator, lang.editorstyle.ErrorLineBack);
sci.SetIndicSetAlpha(indicator, 40); // Improve contrast
}
else if (indicator == indicatorDebugDisabledBreakpoint)
{
sci.SetIndicFore(indicator, lang.editorstyle.DisabledLineBack);
sci.SetIndicSetAlpha(indicator, 40); // Improve contrast
}
sci.SetIndicStyle(indicator, 7);
sci.CurrentIndicator = indicator;
sci.IndicatorClearRange(start, length);
sci.StartStyling(es, mask);
}
示例4: RemoveHighlight
/// <summary>
///
/// </summary>
static public void RemoveHighlight(ScintillaControl sci, Int32 line, Int32 indicator)
{
if (sci == null)
return;
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;
if (indicator == indicatorDebugCurrentLine)
{
sci.SetIndicFore(indicator, DataConverter.ColorToInt32(PluginMain.settingObject.DebugLineColor));
}
else if (indicator == indicatorDebugEnabledBreakpoint)
{
sci.SetIndicFore(indicator, DataConverter.ColorToInt32(PluginMain.settingObject.BreakPointEnableLineColor));
}
else if (indicator == indicatorDebugDisabledBreakpoint)
{
sci.SetIndicFore(indicator, DataConverter.ColorToInt32(PluginMain.settingObject.BreakPointDisableLineColor));
}
sci.SetIndicStyle(indicator, /* (int)ScintillaNet.Enums.IndicatorStyle.RoundBox */ 7);
sci.CurrentIndicator = indicator;
sci.IndicatorClearRange(start, length);
sci.StartStyling(es, mask);
}