示例#1
0
 protected virtual void OnTabChange(IdeTab tab)
 {
     if (TabChange != null)
     {
         TabChange(tab);
     }
 }
示例#2
0
 public void RemoveTab(IdeTab tab)
 {
     if (_tabPanel.Controls.Contains(tab.Button))
     {
         _tabPanel.Controls.Remove(tab.Button);
     }
 }
示例#3
0
        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);
        }
示例#4
0
 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();
 }