private void debugToolStripMenuItem_Click(object sender, EventArgs e) { ToolStripMenuItem menuItem = (ToolStripMenuItem)sender; menuItem.Checked = !menuItem.Checked; if (menuItem.Checked) { ConsoleU.createConsole(); } else { ConsoleU.releaseConsole(); } }