Exemplo n.º 1
0
        public void RemovePublicationConnectionHandler(string publicationNAme)
        {
            if (this._handlerContainersTable.ContainsKey(publicationNAme))
            {
                CF_DPE_PublicationSubscriptionHandler handler = default(CF_DPE_PublicationSubscriptionHandler);
                handler = (CF_DPE_PublicationSubscriptionHandler)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)
                {
                }
            }
        }
Exemplo n.º 2
0
 public void btnUpdateStatistics_Click(System.Object sender, System.EventArgs e)
 {
     try
     {
         IEnumerator enumm = this._handlerContainersTable.GetEnumerator();
         CF_DPE_PublicationSubscriptionHandler hnd = null;
         while (enumm.MoveNext())
         {
             hnd = (CF_DPE_PublicationSubscriptionHandler)(((DictionaryEntry)enumm.Current).Value);
             hnd.UpdateStatistics();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 3
0
        public void AddPublicationConnectionHandler(string publicationNAme)
        {
            if (!this._handlerContainersTable.ContainsKey(publicationNAme))
            {
                System.Windows.Forms.TabPage TabPage = new System.Windows.Forms.TabPage(publicationNAme);

                CF_DPE_PublicationSubscriptionHandler handler = new CF_DPE_PublicationSubscriptionHandler(this._client, publicationNAme);
                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.UpdateStatistics();
                    this.SetPublicationTab(publicationNAme);
                }
                catch (Exception)
                {
                }
            }
        }