当前位置: 首页>>代码示例>>C#>>正文


C# ScintillaNet.Scintilla类代码示例

本文整理汇总了C#中ScintillaNet.Scintilla的典型用法代码示例。如果您正苦于以下问题:C# Scintilla类的具体用法?C# Scintilla怎么用?C# Scintilla使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Scintilla类属于ScintillaNet命名空间,在下文中一共展示了Scintilla类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的ScintillaNet.Scintilla类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。