private void manageCommandsToolStripMenuItem_Click(object sender, EventArgs e) { if (allCommands == null) { allCommands =new Commands(adminController); allCommands.MdiParent = this; allCommands.FormClosed += new FormClosedEventHandler(allCommands_FormClosed); allCommands.WindowState = FormWindowState.Maximized; allCommands.Show(); } else { allCommands.Activate(); } }
void allCommands_FormClosed(object sender, FormClosedEventArgs e) { allCommands = null; //throw new NotImplementedException(); }