private void btnTreatment_Click(object sender, EventArgs e) { if (frmTreatment == null) { frmTreatment = new TreatmentForm(DM, this); } frmTreatment.ShowDialog(); }
/// <summary> /// Creates the Treatment Maintenance window when the Treatment Maintenance button is clicked /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnTreatment_Click(object sender, EventArgs e) { if (frmTreatment == null) // Prevents more than one window is created { frmTreatment = new TreatmentForm(DM, this); } frmTreatment.ShowDialog(); // Shows the window }