private void addElem_Click(object sender, EventArgs e) { FEditMenuElem form = new FEditMenuElem(); switch (form.ShowDialog()) { case DialogResult.OK: appController.AddItem(form.menuItem); this.UpdateItemsList(); break; case DialogResult.Cancel: break; } }
private void EditButton_Click(object sender, EventArgs e) { FEditMenuElem form = new FEditMenuElem(menuItem); switch (form.ShowDialog()) { case DialogResult.OK: form.menuItem.ID = menuItem.ID; if (OnMenuItemChange != null) OnMenuItemChange(this, form.menuItem); break; case DialogResult.Cancel: break; } }