public override void OnClick(TreeView treeView) { foreach (Control control in FirstPlugin.MainF.Controls) { if (control is DockPanel) { if (FirstPlugin.DockedEditorS == null) { FirstPlugin.DockedEditorS = new DockContent(); FirstPlugin.DockedEditorS.Show((DockPanel)control, PluginRuntime.FSHPDockState); } } } if (!EditorIsActive(FirstPlugin.DockedEditorS)) { FirstPlugin.DockedEditorS.Controls.Clear(); BNTXEditor = new BNTXEditor(); BNTXEditor.Text = Text; BNTXEditor.Dock = DockStyle.Fill; BNTXEditor.LoadPicture(DisplayTexture()); BNTXEditor.LoadProperty(this); FirstPlugin.DockedEditorS.Controls.Add(BNTXEditor); } }
public void UpdateBNTXEditor() { if (Viewport.Instance.gL_ControlModern1 == null || Viewport.Instance.gL_ControlModern1.Visible == false) { PluginRuntime.FSHPDockState = WeifenLuo.WinFormsUI.Docking.DockState.Document; } BNTXEditor docked = (BNTXEditor)LibraryGUI.Instance.GetContentDocked(new BNTXEditor()); if (docked == null) { docked = new BNTXEditor(); LibraryGUI.Instance.LoadDockContent(docked, PluginRuntime.FSHPDockState); } docked.Text = Text; docked.Dock = DockStyle.Fill; docked.LoadProperty(this); }