예제 #1
0
 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;
       }
 }
예제 #2
0
 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;
       }
 }