private void payrollCalculatorToolStripMenuItem1_Click(object sender, EventArgs e) { if (payrollCalculatorForm == null) { payrollCalculatorForm = new PayrollCalculatorForm(); payrollCalculatorForm.MdiParent = this; payrollCalculatorForm.FormClosed += PayrollCalculatorForm_FormClosed; payrollCalculatorForm.Show(); } else { payrollCalculatorForm.Activate(); } }
private void PayrollCalculatorForm_FormClosed(object sender, FormClosedEventArgs e) { payrollCalculatorForm = null; }