private void securityToolStripMenuItem_Click(object sender, EventArgs e) { if (_privilege == null) { _privilege = new FrmPrivilege {MdiParent = this}; _privilege.FormClosed += Privilege_FormClosed; _privilege.Show(); } else { _privilege.Activate(); _privilege.WindowState = FormWindowState.Normal; } }
private void Privilege_FormClosed(object sender, FormClosedEventArgs e) { _privilege = null; }