예제 #1
0
 private void CloseTab(BrowserTab tab)
 {
     Tabs.TabPages.Remove(tab);
     tab.Dispose();
     if (Tabs.TabPages.Count == 0)
     {
         AddTab("https://darkorbit.com");
     }
 }
예제 #2
0
 private void CloseTab(int index)
 {
     if (index >= 0)
     {
         BrowserTab bt = tabControl1.TabPages[index] as BrowserTab;
         if (bt != null)
         {
             foreach (BrowserScript bs in bt.Scripts)
             {
                 bs.Stop();
             }
             tabControl1.TabPages.RemoveAt(index);
             bt.Dispose();
         }
     }
     button6.Enabled = tabControl1.TabPages.Count > 0;
 }