void ToolStripMenuItemNewMachineClick(object sender, EventArgs e) { FormCollection fc = Application.OpenForms; foreach (Form currentForm in fc) { if (currentForm.Name == "NewMachineForm") { return; } } NewMachineForm newMachineForm = new NewMachineForm(); newMachineForm.Show(); }
// Side menu buttons void ToolStripMenuItemNewVMClick(object sender, EventArgs e) { NewMachineForm newMachineForm = new NewMachineForm(); newMachineForm.Show(); }