protected virtual void OnTabChange(IdeTab tab) { if (TabChange != null) { TabChange(tab); } }
public void RemoveTab(IdeTab tab) { if (_tabPanel.Controls.Contains(tab.Button)) { _tabPanel.Controls.Remove(tab.Button); } }
private IdeTab CreateTabButton(IdePanel panel) { var tab = new IdeTab(this, panel); SuspendLayout(); _tabPanel.Controls.Add(tab.Button); _label.Visible = false; _tabPanel.Visible = true; ResumeLayout(); return(tab); }
private void SelectTab(IdeTab targetTab) { if (targetTab == SelectedTab) { return; } SelectedTab = targetTab; SuspendLayout(); foreach (var tab in Tabs.Where(t => t != SelectedTab)) { tab.Panel.Visible = false; } SelectedTab.Panel.Visible = true; ResumeLayout(); }