/// <summary>
        /// Create and paint all panels.
        /// </summary>
        internal void ShowPanels()
        {
            Cursor.Current = Cursors.WaitCursor;

            // Clear all previous panels
            tabPanels.TabPages.Clear();

            // Draw all panels
            foreach (Switchboard panel in OTCContext.Project.Switchboards)
            {
                DesignModule.ViewAddPanel(panel,
                                          this.tabPanels,
                                          null,
                                          null,
                                          null,
                                          spcPanel_BlockDoubleClick);
            }

            // Select the first panel
            if (tabPanels.TabPages.Count > 0)
            {
                tabPanels.SelectedTabPage = tabPanels.TabPages[0];
            }

            Cursor.Current = Cursors.Default;
        }
        internal void PanelAdd()
        {
            SwitchboardEditorView form = new SwitchboardEditorView();

            form.ShowDialog(this);

            if (form.DialogResult == DialogResult.OK)
            {
                DesignModule.ViewAddPanel(form.Switchboard,
                                          this.tabPanels,
                                          null,
                                          null,
                                          null,
                                          spcPanel_BlockDoubleClick);
            }
        }
        internal void PanelEdit()
        {
            if (tabPanels.TabPages.Count <= 0)
            {
                MessageBox.Show("There are no switchboard panels in the current project.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            SwitchboardEditorView form = new SwitchboardEditorView((Switchboard)tabPanels.SelectedTabPage.Tag);

            form.ShowDialog(this);

            if (form.DialogResult == System.Windows.Forms.DialogResult.OK)
            {
                DesignModule.ViewAddPanel(form.Switchboard,
                                          this.tabPanels,
                                          tabPanels.SelectedTabPage,
                                          null,
                                          null,
                                          spcPanel_BlockDoubleClick);
            }
        }