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); } }); }
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(); } }); }