private void addNewEmployeeSalaryToolStripMenuItem_Click(object sender, EventArgs e) { if (ansb == null) { ansb = new AddNewSalaryBonus(); ansb.MdiParent = this; ansb.FormClosed += ansb_FormClosed; ansb.Show(); } else { ansb.Activate(); } }
void ansb_FormClosed(object sender, FormClosedEventArgs e) { ansb = null; }