/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.syntaxBoxControl1 = new Puzzle.Windows.Forms.SyntaxBoxControl(); this.syntaxDocument1 = new Puzzle.SourceCode.SyntaxDocument(this.components); this.SuspendLayout(); // // syntaxBoxControl1 // this.syntaxBoxControl1.AllowDrop = true; this.syntaxBoxControl1.AutoListPosition = null; this.syntaxBoxControl1.AutoListSelectedText = ""; this.syntaxBoxControl1.AutoListVisible = false; this.syntaxBoxControl1.BackColor = System.Drawing.Color.White; this.syntaxBoxControl1.CopyAsRTF = false; this.syntaxBoxControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.syntaxBoxControl1.Document = this.syntaxDocument1; this.syntaxBoxControl1.FontName = "Courier new"; this.syntaxBoxControl1.InfoTipCount = 1; this.syntaxBoxControl1.InfoTipPosition = null; this.syntaxBoxControl1.InfoTipSelectedIndex = 0; this.syntaxBoxControl1.InfoTipVisible = false; this.syntaxBoxControl1.Location = new System.Drawing.Point(0, 0); this.syntaxBoxControl1.LockCursorUpdate = false; this.syntaxBoxControl1.Name = "syntaxBoxControl1"; this.syntaxBoxControl1.Size = new System.Drawing.Size(150, 150); this.syntaxBoxControl1.SmoothScroll = false; this.syntaxBoxControl1.SplitviewH = -4; this.syntaxBoxControl1.SplitviewV = -4; this.syntaxBoxControl1.TabGuideColor = System.Drawing.Color.FromArgb(((System.Byte)(244)), ((System.Byte)(243)), ((System.Byte)(234))); this.syntaxBoxControl1.TabIndex = 0; this.syntaxBoxControl1.Text = "syntaxBoxControl1"; this.syntaxBoxControl1.WhitespaceColor = System.Drawing.SystemColors.ControlDark; // this.syntaxBoxControl1.DragOver += new System.Windows.Forms.DragEventHandler(this.syntaxBoxControl1_DragOver); // this.syntaxBoxControl1.DragDrop += new System.Windows.Forms.DragEventHandler(this.syntaxBoxControl1_DragDrop); // this.syntaxBoxControl1.DragEnter += new System.Windows.Forms.DragEventHandler(this.syntaxBoxControl1_DragEnter); // this.syntaxBoxControl1.DragLeave += new System.EventHandler(this.syntaxBoxControl1_DragLeave); // // syntaxDocument1 // this.syntaxDocument1.Lines = new string[] { "" }; this.syntaxDocument1.MaxUndoBufferSize = 1000; this.syntaxDocument1.Modified = false; this.syntaxDocument1.UndoStep = 0; // // SyntaxBoxWrapper // this.Controls.Add(this.syntaxBoxControl1); this.Name = "SyntaxBoxWrapper"; this.ResumeLayout(false); }
public FormatRangeCollection(SyntaxDocument document) { _Document = document; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.syntaxBoxControl1 = new Puzzle.Windows.Forms.SyntaxBoxControl(); this.syntaxDocument1 = new Puzzle.SourceCode.SyntaxDocument(this.components); this.SuspendLayout(); // // syntaxBoxControl1 // this.syntaxBoxControl1.AllowDrop = true; this.syntaxBoxControl1.AutoListPosition = null; this.syntaxBoxControl1.AutoListSelectedText = ""; this.syntaxBoxControl1.AutoListVisible = false; this.syntaxBoxControl1.BackColor = System.Drawing.Color.White; this.syntaxBoxControl1.CopyAsRTF = false; this.syntaxBoxControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.syntaxBoxControl1.Document = this.syntaxDocument1; this.syntaxBoxControl1.FontName = "Courier new"; this.syntaxBoxControl1.InfoTipCount = 1; this.syntaxBoxControl1.InfoTipPosition = null; this.syntaxBoxControl1.InfoTipSelectedIndex = 0; this.syntaxBoxControl1.InfoTipVisible = false; this.syntaxBoxControl1.Location = new System.Drawing.Point(0, 0); this.syntaxBoxControl1.LockCursorUpdate = false; this.syntaxBoxControl1.Name = "syntaxBoxControl1"; this.syntaxBoxControl1.Size = new System.Drawing.Size(150, 150); this.syntaxBoxControl1.SmoothScroll = false; this.syntaxBoxControl1.SplitviewH = -4; this.syntaxBoxControl1.SplitviewV = -4; this.syntaxBoxControl1.TabGuideColor = System.Drawing.Color.FromArgb(((System.Byte)(244)), ((System.Byte)(243)), ((System.Byte)(234))); this.syntaxBoxControl1.TabIndex = 0; this.syntaxBoxControl1.Text = "syntaxBoxControl1"; this.syntaxBoxControl1.WhitespaceColor = System.Drawing.SystemColors.ControlDark; // this.syntaxBoxControl1.DragOver += new System.Windows.Forms.DragEventHandler(this.syntaxBoxControl1_DragOver); // this.syntaxBoxControl1.DragDrop += new System.Windows.Forms.DragEventHandler(this.syntaxBoxControl1_DragDrop); // this.syntaxBoxControl1.DragEnter += new System.Windows.Forms.DragEventHandler(this.syntaxBoxControl1_DragEnter); // this.syntaxBoxControl1.DragLeave += new System.EventHandler(this.syntaxBoxControl1_DragLeave); // // syntaxDocument1 // this.syntaxDocument1.Lines = new string[] { ""}; this.syntaxDocument1.MaxUndoBufferSize = 1000; this.syntaxDocument1.Modified = false; this.syntaxDocument1.UndoStep = 0; // // SyntaxBoxWrapper // this.Controls.Add(this.syntaxBoxControl1); this.Name = "SyntaxBoxWrapper"; this.ResumeLayout(false); }
public SourceCodePrintDocument(SyntaxDocument document) : base() { this.Document = document; }
public SourceCodePrintDocument(SyntaxDocument document) { Document = document; }
/// <summary> /// Default constructor for the SyntaxBoxControl /// </summary> public SyntaxBoxControl() { try { Document = new SyntaxDocument(); CreateViews(); InitializeComponent(); SetStyle(ControlStyles.Selectable, true); //assign keys KeyboardActions.Add(new KeyboardAction(Keys.Z, false, true, false, false, Undo)); KeyboardActions.Add(new KeyboardAction(Keys.Y, false, true, false, false, Redo)); KeyboardActions.Add(new KeyboardAction(Keys.F3, false, false, false, true, FindNext)); KeyboardActions.Add(new KeyboardAction(Keys.C, false, true, false, true, Copy)); KeyboardActions.Add(new KeyboardAction(Keys.X, false, true, false, false, CutClear)); KeyboardActions.Add(new KeyboardAction(Keys.V, false, true, false, false, Paste)); KeyboardActions.Add(new KeyboardAction(Keys.Insert, false, true, false, true, Copy)); KeyboardActions.Add(new KeyboardAction(Keys.Delete, true, false, false, false, Cut)); KeyboardActions.Add(new KeyboardAction(Keys.Insert, true, false, false, false, Paste)); KeyboardActions.Add(new KeyboardAction(Keys.A, false, true, false, true, SelectAll)); KeyboardActions.Add(new KeyboardAction(Keys.F, false, true, false, false, ShowFind)); KeyboardActions.Add(new KeyboardAction(Keys.H, false, true, false, false, ShowReplace)); KeyboardActions.Add(new KeyboardAction(Keys.G, false, true, false, true, ShowGotoLine)); KeyboardActions.Add(new KeyboardAction(Keys.T, false, true, false, false, ShowSettings)); KeyboardActions.Add(new KeyboardAction(Keys.F2, false, true, false, true, ToggleBookmark)); KeyboardActions.Add(new KeyboardAction(Keys.F2, false, false, false, true, GotoNextBookmark)); KeyboardActions.Add(new KeyboardAction(Keys.F2, true, false, false, true, GotoPreviousBookmark) ); KeyboardActions.Add(new KeyboardAction(Keys.Escape, false, false, false, true, ClearSelection)); KeyboardActions.Add(new KeyboardAction(Keys.Tab, false, false, false, false, Selection.Indent)); KeyboardActions.Add(new KeyboardAction(Keys.Tab, true, false, false, false, Selection.Outdent)); AutoListIcons = _AutoListIcons; } catch { // Console.WriteLine (x.StackTrace); } }