本文整理汇总了C#中ScintillaNet.Scintilla类的典型用法代码示例。如果您正苦于以下问题:C# Scintilla类的具体用法?C# Scintilla怎么用?C# Scintilla使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Scintilla类属于ScintillaNet命名空间,在下文中一共展示了Scintilla类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Folding
internal Folding(Scintilla scintilla)
: base(scintilla)
{
IsEnabled = true;
UseCompactFolding = false;
MarkerScheme = FoldMarkerScheme.BoxPlusMinus;
}
开发者ID:revam,项目名称:Gemini,代码行数:7,代码来源:Folding.cs
示例2: InstantiateScintilla
private Scintilla InstantiateScintilla()
{
// TODO: Read preferences from disk, via Controller and Preferences instances.
Scintilla scintilla = new Scintilla();
scintilla.AcceptsReturn = true;
scintilla.AcceptsTab = true;
scintilla.AllowDrop = true;
scintilla.Dock = DockStyle.Fill;
scintilla.ConfigurationManager.CustomLocation = "ScintillaNET.xml";
scintilla.ConfigurationManager.Language = "xml";
scintilla.Enabled = true;
// TODO: Investigate indentation, do it.
//scintilla.Indentation = SmartIndent.Simple;
// TODO: Investigate what is required to claim accessibility, then do it.
scintilla.IsAccessible = false;
scintilla.IsReadOnly = false;
scintilla.Location = new Point(0);
scintilla.MatchBraces = true;
scintilla.Margin = scintilla.Padding = new Padding(0);
// TODO: Calculate the width of the line number margin dynamically.
scintilla.Margins[0].Width = 40;
scintilla.OverType = false;
scintilla.Styles.LineNumber.BackColor = Color.Blue;
scintilla.Styles.LineNumber.ForeColor = Color.Cyan;
scintilla.TabIndex = 0;
scintilla.TabStop = false;
scintilla.Visible = true;
return scintilla;
}
开发者ID:philbooth,项目名称:SchemaBrute,代码行数:29,代码来源:IDE.cs
示例3: KeywordCollection
internal KeywordCollection(Scintilla scintilla)
: base(scintilla)
{
// Auugh, this plagued me for a while. Each of the lexers cna define their own "Name"
// and also asign themsleves to a Scintilla Lexer Constant. Most of the time these
// match the defined constant, but sometimes they don't. We'll always use the constant
// name since it's easier to use, consistent and will always have valid characters.
// However its still valid to access the lexers by this name (as SetLexerLanguage
// uses this value) so we'll create a lookup.
_lexerAliasMap = new Dictionary<string, Lexer>(StringComparer.OrdinalIgnoreCase);
// I have no idea how Progress fits into this. It's defined with the PS lexer const
// and a name of "progress"
_lexerAliasMap.Add("PL/M", Lexer.Plm);
_lexerAliasMap.Add("props", Lexer.Properties);
_lexerAliasMap.Add("inno", Lexer.InnoSetup);
_lexerAliasMap.Add("clarion", Lexer.Clw);
_lexerAliasMap.Add("clarionnocase", Lexer.ClwNoCase );
//_lexerKeywordListMap = new Dictionary<string,string[]>(StringComparer.OrdinalIgnoreCase);
//_lexerKeywordListMap.Add("xml", new string[] { "HTML elements and attributes", "JavaScript keywords", "VBScript keywords", "Python keywords", "PHP keywords", "SGML and DTD keywords" });
//_lexerKeywordListMap.Add("yaml", new string[] { "Keywords" });
// baan, kix, ave, scriptol, diff, props, makefile, errorlist, latex, null, lot, haskell
// lexers don't have keyword list names
}
开发者ID:rudybear,项目名称:moai-ide,代码行数:27,代码来源:Lexing.cs
示例4: BaseScincillaWraper
public BaseScincillaWraper()
{
InitializeComponent();
var ui = TaskScheduler.FromCurrentSynchronizationContext();
if (Process.GetCurrentProcess().ProcessName != "devenv")
{
_sca = new Scintilla();
Initialize(_sca);
_sca.CharAdded += new EventHandler<CharAddedEventArgs>(CharAdded);
splitContainer1.Panel1.Controls.Add(_sca);
var deafultColor = _sca.BackColor;
_sca.BackColor = Color.Gray;
_sca.Enabled = false;
Task.Factory
.StartNew(EvaluationHelper.InitEvaluator)
.ContinueWith(_ =>
{
_sca.Enabled = true;
_sca.BackColor = deafultColor;
}, ui);
}
else
{
BackColor = Color.White;
}
}
开发者ID:ikutsin,项目名称:BinaryAnalysis.Core,代码行数:28,代码来源:BaseScincillaWraper.cs
示例5: IndicatorCollection
internal IndicatorCollection(Scintilla scintilla) : base(scintilla){}
开发者ID:dbbotkin,项目名称:PrimeComm,代码行数:1,代码来源:Indicator.cs
示例6: closeAllToolStripMenuItem_Click
private void closeAllToolStripMenuItem_Click(object sender, EventArgs e)
{
tabControl1.TabPages.Clear();
string title = "New" + (tabControl1.TabCount + 1).ToString();
TabPage myTabPage = new TabPage(title);
ScintillaNet.Scintilla newtext = new ScintillaNet.Scintilla();
myTabPage.Controls.Add(newtext);
newtext.AllowDrop = true;
newtext.AutoComplete.DropRestOfWord = true;
newtext.AutoComplete.ListString = "";
newtext.Dock = System.Windows.Forms.DockStyle.Fill;
newtext.Folding.UseCompactFolding = true;
newtext.Location = new System.Drawing.Point(3, 3);
newtext.Margins.Margin0.Width = 20;
newtext.Margins.Margin1.IsClickable = true;
newtext.Margins.Margin1.IsFoldMargin = true;
newtext.Margins.Margin1.Width = 3;
newtext.Margins.Margin2.IsMarkerMargin = true;
newtext.Margins.Margin2.Width = 16;
newtext.Name = title;
newtext.Size = new System.Drawing.Size(783, 353);
newtext.Styles.BraceBad.FontName = "Verdana";
newtext.Styles.BraceLight.FontName = "Verdana";
newtext.Styles.ControlChar.FontName = "Verdana";
newtext.Styles.Default.FontName = "Verdana";
newtext.Styles.IndentGuide.FontName = "Verdana";
newtext.Styles.LastPredefined.FontName = "Verdana";
newtext.Styles.LineNumber.FontName = "Verdana";
newtext.Styles.Max.FontName = "Verdana";
newtext.TabIndex = 0;
tabControl1.TabPages.Add(myTabPage);
tabControl1.SelectedTab = myTabPage;
}
开发者ID:Lomeli12,项目名称:Notepad-Sharp,代码行数:33,代码来源:Form1.cs
示例7: LexerInitializer
private LexerInitializer(Scintilla scintilla, int startPos, int length)
{
this.scintilla = scintilla;
this.startPos = startPos;
// One line of text
this.text = scintilla.GetRange(startPos, startPos + length).Text;
}
开发者ID:NithinKharvi,项目名称:moo-plus,代码行数:7,代码来源:LexerInitializer.cs
示例8: SnippetManager
public SnippetManager(Scintilla scintilla)
: base(scintilla)
{
_list = new SnippetList(this);
_snippetLinkTimer.Interval = 1;
_snippetLinkTimer.Tick += new EventHandler(_snippetLinkTimer_Tick);
IsEnabled = _isEnabled;
}
开发者ID:dbbotkin,项目名称:PrimeComm,代码行数:10,代码来源:SnippetManager.cs
示例9: Range
public Range(int start, int end, Scintilla scintilla) : base(scintilla)
{
if(start < end)
{
_start = start;
_end = end;
}
else
{
_start = end;
_end = start;
}
}
开发者ID:erisonliang,项目名称:qizmt,代码行数:13,代码来源:Range.cs
示例10: StyleCollection
internal StyleCollection(Scintilla scintilla) : base(scintilla)
{
Bits = 7;
// Defaulting CallTip Settings to Platform defaults
Style s = CallTip;
s.ForeColor = SystemColors.InfoText;
s.BackColor = SystemColors.Info;
s.Font = SystemFonts.StatusFont;
// Making Line Number's BackColor have a named system color
// instead of just the value
LineNumber.BackColor = SystemColors.Control;
}
开发者ID:erisonliang,项目名称:qizmt,代码行数:14,代码来源:Style.cs
示例11: WindowLoaded
private void WindowLoaded(object sender, System.Windows.RoutedEventArgs e)
{
// Create the interop host control.
var host = new WindowsFormsHost();
this.codeEditorControl = new Scintilla { MatchBraces = true };
this.codeEditorControl.DocumentChange += this.CodeEditorControlTextChanged;
// Assign the MaskedTextBox control as the host control's child.
host.Child = this.codeEditorControl;
// Add the interop host control to the Grid
// control's collection of child controls.
this.CodeEditorGrid.Children.Add(host);
}
开发者ID:hmeydac,项目名称:Homeworld,代码行数:14,代码来源:MainWindow.xaml.cs
示例12: Lexing
internal Lexing(Scintilla scintilla)
: base(scintilla)
{
WhitespaceChars = DEFAULT_WHITECHARS;
WordChars = DEFAULT_WORDCHARS;
_keywords = new KeywordCollection(scintilla);
// Language names are a superset lexer names. For instance the c and cs (c#)
// langauges both use the cpp lexer (by default). Languages are kind of a
// SCite concept, while Scintilla only cares about Lexers. However we don't
// need to explicetly map a language to a lexer if they are the same name
// like cpp.
_lexerLanguageMap.Add("cs", "cpp");
_lexerLanguageMap.Add("html", "hypertext");
_lexerLanguageMap.Add("xml", "hypertext");
}
开发者ID:erisonliang,项目名称:qizmt,代码行数:16,代码来源:Lexing.cs
示例13: FindReplace
internal FindReplace(Scintilla scintilla) : base(scintilla)
{
_marker = scintilla.Markers[10];
_marker.SetSymbolInternal(MarkerSymbol.Arrows);
_indicator = scintilla.Indicators[16];
_indicator.Color = Color.Purple;
_indicator.Style = IndicatorStyle.RoundBox;
_window = new FindReplaceDialog();
_window.Scintilla = scintilla;
_incrementalSearcher = new IncrementalSearcher();
_incrementalSearcher.Scintilla = scintilla;
_incrementalSearcher.Visible = false;
scintilla.Controls.Add(_incrementalSearcher);
}
开发者ID:dbbotkin,项目名称:PrimeComm,代码行数:16,代码来源:FindReplace.cs
示例14: Init
public static void Init(Scintilla scintilla)
{
// Reset any current language and enable the StyleNeeded
// event by setting the lexer to container.
scintilla.Indentation.SmartIndentType = SmartIndent.None;
scintilla.ConfigurationManager.Language = String.Empty;
scintilla.Lexing.LexerName = "container";
scintilla.Lexing.Lexer = Lexer.Container;
// Add our custom styles to the collection
scintilla.Styles[QUOTED_STYLE].ForeColor = Color.FromArgb(153, 51, 51);
scintilla.Styles[KEY_STYLE].ForeColor = Color.FromArgb(0, 0, 153);
scintilla.Styles[ASSIGNMENT_STYLE].ForeColor = Color.OrangeRed;
scintilla.Styles[VALUE_STYLE].ForeColor = Color.FromArgb(102, 0, 102);
scintilla.Styles[COMMENT_STYLE].ForeColor = Color.FromArgb(102, 102, 102);
scintilla.Styles[SECTION_STYLE].ForeColor = Color.FromArgb(0, 0, 102);
scintilla.Styles[SECTION_STYLE].Bold = true;
}
开发者ID:NullProjects,项目名称:METAbolt,代码行数:18,代码来源:IniLexer.cs
示例15: ApplyUserStyle
//apply custom style
public static void ApplyUserStyle(Scintilla scintilla,CodeEditorConfig codeeditorcong )
{
Font userFont = new Font(codeeditorcong.Font, codeeditorcong.FontSize, codeeditorcong.FontStyle, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
//config-style line marging
scintilla.Styles[STYLE_LINENUMBER].BackColor = Color.White;
scintilla.Styles[STYLE_LINENUMBER].ForeColor = Color.DarkTurquoise;
scintilla.Styles[STYLE_LINENUMBER].Bold = true;
//apply user configuration
scintilla.UseFont = true;
scintilla.Font = userFont;
scintilla.Styles[STYLE_LINENUMBER].Size =(float)codeeditorcong.FontSize;
int Ratio = (int)codeeditorcong.FontSize;
scintilla.Margins[LINENUMBER_MARGIN].Width = Ratio * scintilla.Lines.Count.ToString().Length + 4;
scintilla.Folding.MarkerScheme = codeeditorcong.FoldingMarker;
scintilla.Caret.HighlightCurrentLine = codeeditorcong.IsLineHilighting;
}
开发者ID:NithinKharvi,项目名称:moo-plus,代码行数:21,代码来源:LexerInitializer.cs
示例16: GetError
public override List<LuaError> GetError(String text, Scintilla editor)
{
// Search the editor's characters for SCE_LUA_STRINGEOL.
Boolean insideInvalidEOL = false;
String textBuffer = "";
Int32 errorIndex = 0;
List<LuaError> errorList = new List<LuaError>();
for (Int32 currentIndex = 0; currentIndex < text.Length; currentIndex += 1)
{
Byte characterStyle = editor.Styles.GetStyleAt(currentIndex);
if (characterStyle == (byte)LexerStyleConstants.SCE_LUA_STRINGEOL)
{
if (insideInvalidEOL)
{
textBuffer += text[currentIndex];
}
else
{
insideInvalidEOL = true;
errorIndex = currentIndex;
textBuffer = ""; // by not setting this to the character, we omit the leading " which
// is normally included in the STRINGEOL section.
}
}
else if (insideInvalidEOL)
{
KeyValuePair<Int32, Int32> lineColumn = SyntaxChecker.LineColumnBeforeIndex(text, errorIndex);
errorList.Add(new LuaError(
lineColumn.Key,
lineColumn.Value,
errorIndex,
textBuffer.Length,
String.Format(this.errorMsg, textBuffer.Trim())
));
insideInvalidEOL = false;
errorIndex = 0;
textBuffer = "";
}
}
return errorList;
}
开发者ID:rudybear,项目名称:moai-ide,代码行数:41,代码来源:SyntaxChecker.cs
示例17: Styler
public Styler(ScintillaNet.Scintilla ScintillaCtrl)
{
STLControl = ScintillaCtrl;
InitStyleIndex();
LoadStyle(STLControl);
//ApplyStyle(@"(\$\w+)", styleIndex["Variable"], 1);
//ApplyStyle(@"(\$\w+?)\s*=[^>]", styleIndex["Variable (declare)"], 1);
//ApplyStyle(@"([=+&])", styleIndex["Operators"], 1);
//ApplyStyle(@"(VK_\w+)", styleIndex["Virtual-key"], 1);
//ApplyStyle(@"[Uu][0-9A-Fa-f]{4}", styleIndex["Hex Notation"], 0);
//ApplyStyle(@"(?:NULL)|(?:null)", styleIndex["NULL Value"], 0);
//ApplyStyle(@"(\[[*^]\])", styleIndex["Any Operator"], 1);
//ApplyStyle(@"(\[\$\w+\])", styleIndex["Reference"], 1);
//ApplyStyle(@"([><])", styleIndex["Virtual-key Start End Operator"], 1);
//ApplyStyle(@"(=>)", styleIndex["Out Operator"], 1);
//ApplyStyle(@"(\(\s*(?:['""])[^\1\n]+?\1\s*\))\B", styleIndex["Switch"], 1);
//ApplyStyle(@"(\\)\s+?$", styleIndex["Line Joiner"], 1);
//ApplyStyle(@"((['""])[^\1\n]+?\2\B)", styleIndex["String"], 1);
//ApplyStyle(@"(['""])[^\1\n]*(\\[Uu][0-9a-fA-F]{4})[^\1\n]*?\1\B", styleIndex["In-string Hex Notation"], 2);
}
开发者ID:khonsoe,项目名称:keymagic,代码行数:22,代码来源:Styler.cs
示例18: AutoComplete
internal AutoComplete(Scintilla scintilla) : base(scintilla)
{
scintilla.CharAdded += new EventHandler<CharAddedEventArgs>(scintilla_CharAdded);
scintilla.KeyDown += new KeyEventHandler(scintilla_KeyDown);
scintilla.AutoCompleteAccepted += new EventHandler<AutoCompleteAcceptedEventArgs>(scintilla_AutoCompleteAccepted);
RegisterImage(1, DefaultImages.PrivateClass);
RegisterImage(2, DefaultImages.PrivateEnum);
RegisterImage(3, DefaultImages.PrivateEvent);
RegisterImage(4, DefaultImages.PrivateExtension);
RegisterImage(5, DefaultImages.PrivateField);
RegisterImage(6, DefaultImages.PrivateInterface);
RegisterImage(7, DefaultImages.PrivateMethod);
RegisterImage(9, DefaultImages.PrivateProperty);
RegisterImage(10, DefaultImages.PrivateStructure);
RegisterImage(11, DefaultImages.ProtectedClass);
RegisterImage(12, DefaultImages.ProtectedDelegate);
RegisterImage(13, DefaultImages.ProtectedEnum);
RegisterImage(14, DefaultImages.ProtectedEvent);
RegisterImage(15, DefaultImages.ProtectedExtension);
RegisterImage(16, DefaultImages.ProtectedField);
RegisterImage(17, DefaultImages.ProtectedInterface);
RegisterImage(18, DefaultImages.ProtectedMethod);
RegisterImage(19, DefaultImages.ProtectedOperator);
RegisterImage(20, DefaultImages.ProtectedProperty);
RegisterImage(21, DefaultImages.ProtectedStructure);
RegisterImage(22, DefaultImages.PublicClass);
RegisterImage(23, DefaultImages.PublicDelegate);
RegisterImage(24, DefaultImages.PublicEnum);
RegisterImage(25, DefaultImages.PublicEvent);
RegisterImage(26, DefaultImages.PublicExtension);
RegisterImage(27, DefaultImages.PublicField);
RegisterImage(28, DefaultImages.PublicInterface);
RegisterImage(29, DefaultImages.PublicMethod);
RegisterImage(30, DefaultImages.PublicOperator);
RegisterImage(31, DefaultImages.PublicProperty);
RegisterImage(32, DefaultImages.PublicStructure);
RegisterImage(33, DefaultImages.Keyword);
RegisterImage(34, DefaultImages.Snippet);
}
开发者ID:dbbotkin,项目名称:PrimeComm,代码行数:39,代码来源:AutoComplete.cs
示例19: EndOfLine
internal EndOfLine(Scintilla scintilla) : base(scintilla) { }
开发者ID:dbbotkin,项目名称:PrimeComm,代码行数:1,代码来源:EndOfLine.cs
示例20: Indicator
internal Indicator(int number, Scintilla scintilla) : base(scintilla)
{
_number = number;
}
开发者ID:dbbotkin,项目名称:PrimeComm,代码行数:4,代码来源:Indicator.cs
注:本文中的ScintillaNet.Scintilla类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论