本文整理汇总了C#中ScintillaNET.Scintilla.SetWhitespaceForeColor方法的典型用法代码示例。如果您正苦于以下问题:C# Scintilla.SetWhitespaceForeColor方法的具体用法?C# Scintilla.SetWhitespaceForeColor怎么用?C# Scintilla.SetWhitespaceForeColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ScintillaNET.Scintilla
的用法示例。
在下文中一共展示了Scintilla.SetWhitespaceForeColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CodeView
public CodeView()
{
InitializeComponent();
this.scintilla1 = new ScintillaNET.Scintilla();
this.Controls.Add(this.scintilla1);
this.scintilla1.Dock = DockStyle.Fill;
this.scintilla1.TabIndex = 1;
this.scintilla1.Text = "scintilla1";
this.scintilla1.HScrollBar = true;
this.scintilla1.VScrollBar = true;
scintilla1.Margins[0].Type = MarginType.Number;
scintilla1.Margins[0].Width = 35;
// Display whitespace in orange
scintilla1.WhitespaceSize = 2;
scintilla1.ViewWhitespace = WhitespaceMode.VisibleAlways;
scintilla1.SetWhitespaceForeColor(true, Color.FromArgb(43, 145, 175));
// Configuring the default style with properties
// we have common to every lexer style saves time.
scintilla1.StyleResetDefault();
scintilla1.Styles[Style.Default].Font = "Consolas";
scintilla1.Styles[Style.Default].Size = 14;
scintilla1.StyleClearAll();
// Configure the CPP (C#) lexer styles
scintilla1.Styles[Style.Cpp.Default].ForeColor = Color.Silver;
scintilla1.Styles[Style.Cpp.Comment].ForeColor = Color.FromArgb(0, 128, 0); // Green
scintilla1.Styles[Style.Cpp.CommentLine].ForeColor = Color.FromArgb(0, 128, 0); // Green
scintilla1.Styles[Style.Cpp.CommentLineDoc].ForeColor = Color.FromArgb(128, 128, 128); // Gray
scintilla1.Styles[Style.Cpp.Number].ForeColor = Color.Olive;
scintilla1.Styles[Style.Cpp.Word].ForeColor = Color.Blue;
scintilla1.Styles[Style.Cpp.Word2].ForeColor = Color.Blue;
scintilla1.Styles[Style.Cpp.String].ForeColor = Color.FromArgb(163, 21, 21); // Red
scintilla1.Styles[Style.Cpp.Character].ForeColor = Color.FromArgb(163, 21, 21); // Red
scintilla1.Styles[Style.Cpp.Verbatim].ForeColor = Color.FromArgb(163, 21, 21); // Red
scintilla1.Styles[Style.Cpp.StringEol].BackColor = Color.Pink;
scintilla1.Styles[Style.Cpp.Operator].ForeColor = Color.Purple;
scintilla1.Styles[Style.Cpp.Preprocessor].ForeColor = Color.Maroon;
scintilla1.Lexer = Lexer.Cpp;
// Set the keywords
scintilla1.SetKeywords(0, "abstract as base break case catch checked continue default delegate do else event explicit extern false finally fixed for foreach goto if implicit in interface internal is lock namespace new null object operator out override params private protected public readonly ref return sealed sizeof stackalloc switch this throw true try typeof unchecked unsafe using virtual while");
scintilla1.SetKeywords(1, "bool byte char class const decimal double enum float int long sbyte short static string struct uint ulong ushort void");
scintilla1.CharAdded += Scintilla1_CharAdded;
}