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


C# ScintillaNET.Scintilla类代码示例

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


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

示例1: MarginClickEventArgs

 /// <summary>
 /// Initializes a new instance of the <see cref="MarginClickEventArgs" /> class.
 /// </summary>
 /// <param name="scintilla">The <see cref="Scintilla" /> control that generated this event.</param>
 /// <param name="modifiers">The modifier keys that where held down at the time of the margin click.</param>
 /// <param name="bytePosition">The zero-based byte position within the document where the line adjacent to the clicked margin starts.</param>
 /// <param name="margin">The zero-based index of the clicked margin.</param>
 public MarginClickEventArgs(Scintilla scintilla, Keys modifiers, int bytePosition, int margin)
 {
     this.scintilla = scintilla;
     this.bytePosition = bytePosition;
     Modifiers = modifiers;
     Margin = margin;
 }
开发者ID:uQr,项目名称:ScintillaNET,代码行数:14,代码来源:MarginClickEventArgs.cs

示例2: 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;
        }
开发者ID:zhh007,项目名称:CKGen,代码行数:49,代码来源:CodeView.cs

示例3: InsertCheckEventArgs

 /// <summary>
 /// Initializes a new instance of the <see cref="InsertCheckEventArgs" /> class.
 /// </summary>
 /// <param name="scintilla">The <see cref="Scintilla" /> control that generated this event.</param>
 /// <param name="bytePosition">The zero-based byte position within the document where text is being inserted.</param>
 /// <param name="byteLength">The length in bytes of the inserted text.</param>
 /// <param name="text">A pointer to the text being inserted.</param>
 public InsertCheckEventArgs(Scintilla scintilla, int bytePosition, int byteLength, IntPtr text)
 {
     this.scintilla = scintilla;
     this.bytePosition = bytePosition;
     this.byteLength = byteLength;
     this.textPtr = text;
 }
开发者ID:uQr,项目名称:ScintillaNET,代码行数:14,代码来源:InsertCheckEventArgs.cs

示例4: SourceView

        public SourceView(string text)
            : base("SourceView")
        {
            TextBox = new Scintilla
            {
                Lexer = ScintillaNET.Lexer.Container,
                VirtualSpaceOptions = VirtualSpace.UserAccessible
            };

            foreach (var id in TextStyle.All)
                StyleConfig(id);

            TextBox.StyleNeeded += (s, args) => SignalStyleNeeded(args.Position);
            TextBox.TextChanged += (s, args) => OnTextChanged();

            TextBox.ContextMenu = new ContextMenu();
            TextBox.ContextMenu.Popup += (s, args) => OnContextMenuPopup();

            CompilerCache = new ValueCache<CompilerBrowser>(CreateCompilerBrowser);

            ResultCachesViews = new FunctionCache<Value, ResultCachesView>
                (item => new ResultCachesView(item, this));
            ChildViews = new FunctionCache<object, ChildView>(CreateView);

            Client = TextBox;

            TextBox.Text = text;

            TraceLog = new BrowseTraceCollector(this);
            LogView = new TraceLogView(this);
        }
开发者ID:hahoyer,项目名称:reni.cs,代码行数:31,代码来源:SourceView.cs

示例5: Indicator

        /// <summary>
        ///     Initializes a new instance of the <see cref="Indicator" /> class.
        /// </summary>
        /// <param name="owner">The <see cref="Scintilla" /> control that created this object.</param>
        /// <param name="index">The zero-based index of the document line containing the annotation.</param>
        protected internal Indicator(Scintilla owner, int index)
        {
            _scintilla = owner;
            _index = index;

            _colorBagKey = "Indicator." + index + ".Color";
        }
开发者ID:jtheisen,项目名称:ScintillaNET26,代码行数:12,代码来源:Indicator.cs

示例6: Scrolling

        /// <summary>
        ///     Initializes a new instance of the <see cref="Scrolling" /> class
        ///     for the given <see cref="Scintilla" /> control.
        /// </summary>
        /// <param name="scintilla">The <see cref="Scintilla" /> control that created this object.</param>
        /// <exception cref="ArgumentNullException"><paramref name="scintilla" /> is null.</exception>
        public Scrolling(Scintilla scintilla)
        {
            if (scintilla == null)
                throw new ArgumentNullException("scintilla");

            _scintilla = scintilla;
        }
开发者ID:jtheisen,项目名称:ScintillaNET26,代码行数:13,代码来源:Scrolling.cs

示例7: InitSource

        private static void InitSource(Scintilla scintilla)
        {
            scintilla.Text = @"using System;
using System.Text;
using System.IO;

// doc
// doc
// doc
// doc

/*
  doc
  doc
  doc
*/

namespace toto
{
  public class toto
  {
toto
  }
toto
}

";
        }
开发者ID:labeuze,项目名称:source,代码行数:28,代码来源:Test_Form.cs

示例8: ScintillaBookmark

        public ScintillaBookmark(Scintilla scintillaControl)
        {
            _scintillaControl = scintillaControl;
            InitScintillaControl();

            InitParentForm();
        }
开发者ID:labeuze,项目名称:source,代码行数:7,代码来源:ScintillaBookmark.cs

示例9: KeywordCollection

        internal KeywordCollection(Scintilla scintilla)
            : base(scintilla)
        {
            if (_lexerStyleMap == null) 1.ToString();
            if (_lexerKeywordListMap == null) 1.ToString();

            // 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:NekoProject,项目名称:NekoKun,代码行数:30,代码来源:KeywordCollection.cs

示例10: Functions

        public Functions( Scintilla RT)
        {
            InitializeComponent();
            this.RT = RT;

            dataGridView1.Columns.Add("Nombre","Nombre");
            dataGridView1.Columns.Add("Tipo","Tipo");
        }
开发者ID:carlosv14,项目名称:Postgres-Manager,代码行数:8,代码来源:Functions.cs

示例11: AutoCSelectionEventArgs

 /// <summary>
 /// Initializes a new instance of the <see cref="AutoCSelectionEventArgs" /> class.
 /// </summary>
 /// <param name="scintilla">The <see cref="Scintilla" /> control that generated this event.</param>
 /// <param name="bytePosition">The zero-based byte position within the document of the word being completed.</param>
 /// <param name="text">A pointer to the selected autocompletion text.</param>
 /// <param name="ch">The character that caused the completion.</param>
 /// <param name="listCompletionMethod">A value indicating the way in which the completion occurred.</param>
 public AutoCSelectionEventArgs(Scintilla scintilla, int bytePosition, IntPtr text, int ch, ListCompletionMethod listCompletionMethod)
 {
     this.scintilla = scintilla;
     this.bytePosition = bytePosition;
     this.textPtr = text;
     Char = ch;
     ListCompletionMethod = listCompletionMethod;
 }
开发者ID:uQr,项目名称:ScintillaNET,代码行数:16,代码来源:AutoCSelectionEventArgs.cs

示例12: IniLexer

        private IniLexer(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:herbert2008,项目名称:WeCode,代码行数:8,代码来源:IniLexer.cs

示例13: Trigger_Create

 public Trigger_Create(NpgsqlConnection conn,Scintilla rt,RichTextBox t)
 {
     InitializeComponent();
     this.conn = conn;
     pc = new Postgres_Connection();
     this.t = t;
     this.rt = rt;
 }
开发者ID:carlosv14,项目名称:Postgres-Manager,代码行数:8,代码来源:Trigger_Create.cs

示例14: BeforeModificationEventArgs

        /// <summary>
        /// Initializes a new instance of the <see cref="BeforeModificationEventArgs" /> class.
        /// </summary>
        /// <param name="scintilla">The <see cref="Scintilla" /> control that generated this event.</param>
        /// <param name="source">The source of the modification.</param>
        /// <param name="bytePosition">The zero-based byte position within the document where text is being modified.</param>
        /// <param name="byteLength">The length in bytes of the text being modified.</param>
        /// <param name="text">A pointer to the text being inserted.</param>
        public BeforeModificationEventArgs(Scintilla scintilla, ModificationSource source, int bytePosition, int byteLength, IntPtr text)
        {
            this.scintilla = scintilla;
            this.bytePosition = bytePosition;
            this.byteLength = byteLength;
            this.textPtr = text;

            Source = source;
        }
开发者ID:uQr,项目名称:ScintillaNET,代码行数:17,代码来源:BeforeModificationEventArgs.cs

示例15: ScintillaFindText

        public ScintillaFindText(Scintilla scintillaControl, int scintillaIndicator = 0)
        {
            _scintillaControl = scintillaControl;
            if (scintillaIndicator != 0)
                _scintillaIndicator = scintillaIndicator;
            InitScintillaControl();

            InitForm();
        }
开发者ID:labeuze,项目名称:source,代码行数:9,代码来源:ScintillaFindText.cs


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