Пример #1
0
 public void CloseFaTab(FATabStripItem tab, bool autoDisconn = false)
 {
     this.BeginInvoke((MethodInvoker) delegate()
     {
         if (TAB_MONITOR.ContainsKey(tab))
         {
             MonitorForm form = TAB_MONITOR[tab];
             TAB_MONITOR.Remove(tab);
             form.Disconnection();
             form.Close();
             faTab.Items.Remove(tab);
         }
     });
 }
Пример #2
0
        private void faTab_TabStripItemClosing(TabStripItemClosingEventArgs e)
        {
            FATabStripItem tab = e.Item;

            this.BeginInvoke((MethodInvoker) delegate()
            {
                if (TAB_MONITOR.ContainsKey(tab))
                {
                    MonitorForm form = TAB_MONITOR[tab];
                    TAB_MONITOR.Remove(tab);
                    form.Disconnection();
                    form.Close();
                }
            });
        }