public void RemovePublicationHandler(string publicationNAme) { if (this._handlerContainersTable.ContainsKey(publicationNAme)) { CF_DPE_PublicationPostHandler handler = default(CF_DPE_PublicationPostHandler); handler = (CF_DPE_PublicationPostHandler)this._handlerContainersTable[publicationNAme]; try { handler.Dispose(); } catch (Exception) { } try { this._handlerContainersTable.Remove(publicationNAme); } catch (Exception) { } } if (this._handlersTabPagesTable.ContainsKey(publicationNAme)) { System.Windows.Forms.TabPage tab = (System.Windows.Forms.TabPage) this._handlersTabPagesTable[publicationNAme]; this.tabPublicationHandlers.TabPages.Remove(tab); try { tab.Dispose(); } catch (Exception) { } } }
public frm_DPE_SimulationStatistics(CF_DPE_PublicationPostHandler publicationsHandler) { // This call is required by the Windows Form Designer. InitializeComponent(); // Add any initialization after the InitializeComponent() call. this._publicationsHandler = publicationsHandler; }
public void Button2_Click(System.Object sender, System.EventArgs e) { try { CF_DPE_PublicationPostHandler handler = default(CF_DPE_PublicationPostHandler); IEnumerator enumm = this._handlerContainersTable.GetEnumerator(); while (enumm.MoveNext()) { handler = (CF_DPE_PublicationPostHandler)((DictionaryEntry)enumm.Current).Value; handler.StopAll_DATA_UPDATE_Simulations(); handler.StopAll_DATA_RESET_Simulations(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public void AddPublicationHandler(string publicationNAme) { if (!this._handlerContainersTable.ContainsKey(publicationNAme)) { System.Windows.Forms.TabPage TabPage = new System.Windows.Forms.TabPage(publicationNAme); CF_DPE_PublicationPostHandler handler = new CF_DPE_PublicationPostHandler(this._client, publicationNAme, this._ClientHandlerData); handler.Dock = System.Windows.Forms.DockStyle.Fill; TabPage.Controls.Add(handler); TabPage_Add(this.tabPublicationHandlers, TabPage); this._handlerContainersTable.Add(publicationNAme, handler); this._handlersTabPagesTable.Add(publicationNAme, TabPage); try { handler.LoadPublicationVariables(); this.SetPublicationTab(publicationNAme); } catch (Exception) { } } }