private void msiMenus_Click(object sender, EventArgs e) { bool IsOpen = false; foreach (Form f in Application.OpenForms) { if (f.Text == "FormDishes") { IsOpen = true; f.Focus(); break; } } if (IsOpen == false) { FormMenus f2 = new FormMenus(); f2.MdiParent = this; f2.Show(); } }
private void FormAddMenu_FormClosing(object sender, FormClosingEventArgs e) { FormMenus form = FormMenus.getInstance(); form.RefreshData(); }
public FormMenus() { InitializeComponent(); instance = this; menuUsed = new MenuORM().getUsed(); }