本文整理匯總了C#中WeifenLuo.WinFormsUI.Docking.DockPanel.Invoke方法的典型用法代碼示例。如果您正苦於以下問題:C# DockPanel.Invoke方法的具體用法?C# DockPanel.Invoke怎麽用?C# DockPanel.Invoke使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WeifenLuo.WinFormsUI.Docking.DockPanel
的用法示例。
在下文中一共展示了DockPanel.Invoke方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: EditorContainer
//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); }));
}