예제 #1
0
 public void updateTab(ClientDB client)
 {
     if (openedTabs.ContainsKey(client.idClient))
     {
         MyTabPage tabPage = openedTabs[client.idClient];
         tabPage.Text = client.raisonSocial;
     }
 }
예제 #2
0
        /// <summary>
        /// Add a client to the TabControl, check whether the form display Client isn't already opened
        /// </summary>
        /// <param name="client">Used to link the tab with the client</param>
        public void addTab(frmDspClient fdc)
        {
            MyTabPage tabPage = new MyTabPage(fdc);

            //Add the tab to the tab control
            this.Controls.Add(tabPage);
            //Set the actual display
            this.SelectTab(tabPage);
            openedTabs.Add(fdc.Client.idClient, tabPage);
        }
예제 #3
0
 /// <summary>
 /// Remove the tab from the tabControl
 /// <para>Check whether the tab is already opened</para>
 /// </summary>
 public void removeTab(ClientDB client)
 {
     if (openedTabs.ContainsKey(client.idClient))
     {
         MyTabPage tabPage = (MyTabPage)openedTabs[client.idClient];
         if (tabPage != null)
         {
             this.TabPages.Remove(tabPage);
             openedTabs.Remove(client.idClient);
         }
     }
 }
예제 #4
0
        public Boolean displayTab(ClientDB client)
        {
            Boolean tabExist = false;

            if (openedTabs.ContainsKey(client.idClient))
            {
                MyTabPage tabPage = (MyTabPage)openedTabs[client.idClient];
                this.SelectTab(tabPage);
                tabExist = true;
            }
            else
            {
                tabExist = false;
            }

            return(tabExist);
        }