private static void InitTextEditor() { // Syntax definitions are loaded globally for all TextEditor instances, // so we only need to call this method once on startup. var editor = TextEditorFactory.CreateMultiLineTextEditor(); editor.LoadSyntaxDefinitions(new BDHeroT4SyntaxModeProvider()); }
/// <summary> /// Constructs a new <see href="TextEditorControl"/> instance. /// </summary> public TextEditorControl() { Editor = TextEditorFactory.CreateMultiLineTextEditor(); Editor.Multiline = true; Editor.Control.Anchor = (AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom); _standardContextMenuStrip = new TextEditorContextMenuStrip(Editor); SetStyle(ControlStyles.Selectable, false); BindEvents(); // Default values BorderStyle = BorderStyle.Fixed3D; StandardContextMenu = true; Controls.Add(Editor.Control); Editor.ReadOnlyChanged += EditorOnReadOnlyChanged; Editor.Control.PreviewKeyDown += ControlOnPreviewKeyDown; }