Inheritance: System.Windows.Forms.Control
Beispiel #1
0
 //private DockPanel _DockPanel;
 //private DockState _DockState;
 public EditorContainer(Editor editor, DockPanel dock, DockState dockState = DockState.Document)
 {
     Editor = editor;
     Editor.UndoRedoStateChanged += Editor_UndoRedoStateChanged;
     Editor.TextChangedDelayed += Editor_TextChangedDelayed;
     Splitter = new Splitter() { Dock = DockStyle.Right, BackColor = SystemColors.ControlDarkDark, Width = 4 };
     DocumentMap = new DocumentMap() {
         Target = editor,
         Dock = DockStyle.Right,
         Width = DocumentMapInitialWidth,
         MinimumSize = new Size(DocumentMapMinimumWidth, 0),
         Scale = DocumentMapInitialWidth * DocumentMapScaleFactor,
         BackColor = EditorSyntax.Styles.Background,
         ForeColor = Color.FromArgb(0, 122, 204)
     };
     DocumentMap.DoubleClick += DocumentMap_DoubleClick;
     DocumentMap.MouseWheel += DocumentMap_MouseWheel;
     Splitter.SplitterMoved += Splitter_SplitterMoved;
     Name = Editor.File.FileName;
     ToolTipText = Editor.File.Path;
     Controls.Add(Editor);
     Controls.Add(Splitter);
     Controls.Add(DocumentMap);
     UpdateText(true);
     FormClosing += EditorContainer_FormClosing;
     FormClosed += EditorContainer_FormClosed;
     System.Threading.Thread.Sleep(10);
     dock.Invoke(new Action(() => { Show(dock, dockState); }));
 }
Beispiel #2
0
 private void CreateDocumentMap()
 {
     map = new DocumentMap();
     map.Dock = DockStyle.Right;
     ThemifyDocumentMap();
     map.Location = new Point(144, 0);
     map.ScrollbarVisible = false;
     map.Size = new Size(140, 262);
     map.TabIndex = 2;
     map.Visible = true;
     map.Target = codebox;
     Controls.Add(map);
 }