本文整理汇总了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); }));
}