/// <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); }
private frmDspClient detailClient(ClientDB client) { frmDspClient fdc = new frmDspClient(client); fdc.UpdatingClient += new ClientHandler(this.updateClient); fdc.DeletingClient += new ClientHandler(this.deleteClient); fdc.ClosingTab += new ClientHandler(this.closingTab); fdc.TopLevel = false; fdc.Dock = DockStyle.Fill; fdc.Show(); return(fdc); }
public MyTabPage(frmDspClient fdc) : base(fdc.Client.raisonSocial.ToUpper().Trim()) { this.fdc = fdc; this.Controls.Add(fdc); }