public FormAnimaux(FormClients frm = null, FormRDV frmR = null) { InitializeComponent(); if (frm != null) { frmClients = frm; } else if (frmR != null) { frmRDV = frmR; } }
/// <summary> /// Affichage de la forme de Gestion des Prises de RDV + écoute de la fermeture de cette fenêtre /// </summary> private void AfficherRDV(object sender, EventArgs e) { FormRDV frm; if (!priseDeRendezVousToolStripMenuItem.Checked) { frm = new FormRDV(); frm.MdiParent = this; frm.Show(); priseDeRendezVousToolStripMenuItem.Checked = true; toolStripBt_RDV.Checked = true; frm.BringToFront(); frm.FormClosed += FermetureFille; } else { frm = (FormRDV)Array.Find(this.MdiChildren, (Form f) => f.Name == "FormRDV"); frm.BringToFront(); } }