private void gérerToolStripMenuItem1_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) { FormCategories f2 = new FormCategories(); f2.MdiParent = this; f2.Show(); } }
private void FormAddCategory_FormClosing(object sender, FormClosingEventArgs e) { FormCategories form = FormCategories.getInstance(); form.RefreshData(); }
public FormCategories() { InitializeComponent(); instance = this; }