void viewQuickAccessToolStripMenuItem_CheckedChanged(object sender, EventArgs e) { try { Gui.Config["QuickAccess"] = viewQuickAccessToolStripMenuItem.Checked; if (viewQuickAccessToolStripMenuItem.Checked) { DockQuickAccess.Show(); } else { DockQuickAccess.Hide(); } } catch (Exception ex) { Utility.ReportException(ex); } }
void MDIParent_Shown(object sender, EventArgs e) { try { SetDockDefault(DockFiles, "Files"); DockFiles.Show(dockPanel, DockState.Document); DockFiles.PanelPane.Layout += PanelPane_Layout; SetDockDefault(DockEditors, "Editors"); DockEditors.Show(DockFiles.Pane, DockAlignment.Right, 0.7); DockEditors.PanelPane.Layout += PanelPane_Layout; SetDockDefault(DockQuickAccess, "Quick Access"); DockQuickAccess.Show(DockFiles.Pane, DockAlignment.Top, 0.3); SetDockDefault(DockRenderer, "Renderer"); DockRenderer.Show(dockPanel, DockState.DockRight); SetDockDefault(DockImage, "Image"); DockImage.Show(dockPanel, DockState.DockRight); DockRenderer.Activate(); SetDockDefault(DockLog, "Log"); DockLog.Show(dockPanel, DockState.DockBottom); SetDockDefault(DockScript, "Script"); DockScript.Show(DockLog.Pane, DockAlignment.Right, 0.5); defaultDocks = new Tuple <DockContent, ToolStripMenuItem>[] { new Tuple <DockContent, ToolStripMenuItem>(DockFiles, viewFilesToolStripMenuItem), new Tuple <DockContent, ToolStripMenuItem>(DockEditors, viewEditorsToolStripMenuItem), new Tuple <DockContent, ToolStripMenuItem>(DockImage, viewImageToolStripMenuItem), new Tuple <DockContent, ToolStripMenuItem>(DockRenderer, viewRendererToolStripMenuItem), new Tuple <DockContent, ToolStripMenuItem>(DockLog, viewLogToolStripMenuItem), new Tuple <DockContent, ToolStripMenuItem>(DockScript, viewScriptToolStripMenuItem) }; if (!(viewQuickAccessToolStripMenuItem.Checked = (bool)Gui.Config["QuickAccess"])) { DockQuickAccess.Hide(); } viewFilesToolStripMenuItem.Checked = true; viewEditorsToolStripMenuItem.Checked = true; viewRendererToolStripMenuItem.Checked = true; viewImageToolStripMenuItem.Checked = true; viewLogToolStripMenuItem.Checked = true; viewScriptToolStripMenuItem.Checked = true; viewQuickAccessToolStripMenuItem.CheckedChanged += viewQuickAccessToolStripMenuItem_CheckedChanged; viewFilesToolStripMenuItem.CheckedChanged += new EventHandler(viewFilesToolStripMenuItem_CheckedChanged); viewEditorsToolStripMenuItem.CheckedChanged += new EventHandler(viewEditorsToolStripMenuItem_CheckedChanged); viewRendererToolStripMenuItem.CheckedChanged += new EventHandler(viewRendererToolStripMenuItem_CheckedChanged); viewImageToolStripMenuItem.CheckedChanged += new EventHandler(viewImageToolStripMenuItem_CheckedChanged); viewLogToolStripMenuItem.CheckedChanged += new EventHandler(viewLogToolStripMenuItem_CheckedChanged); viewScriptToolStripMenuItem.CheckedChanged += new EventHandler(viewScriptToolStripMenuItem_CheckedChanged); KeysConverter conv = new KeysConverter(); foreach (var tool in PluginManager.Tools) { ToolStripMenuItem item = new ToolStripMenuItem(tool[1], null, new EventHandler(OpenTool)); item.Tag = tool[0]; item.ShortcutKeys = (Keys)conv.ConvertFromString(tool[2]); toolsToolStripMenuItem.DropDownItems.Add(item); } if (CommandLineArgumentHandler.SB3UtilityIsServer()) { CommandLineArgumentHandler.ReadyToServe(); } #if DEBUG Test(); #endif } catch (Exception ex) { Utility.ReportException(ex); } }