本文整理匯總了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;
}