Ejemplo n.º 1
0
 private void buttonEdit_Click(object sender, EventArgs e)
 {
     if (list.FocusedNode != null)
     {
         int            index  = list.GetNodeIndex(list.FocusedNode);
         GamemenuDialog dialog = new GamemenuDialog(actions[index]);
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             actions[index].label      = dialog.caption;
             actions[index].command    = dialog.item;
             actions[index].inGame     = dialog.ingame;
             actions[index].onlyMulti  = dialog.onlyMulti;
             actions[index].onlySingle = dialog.onlySingle;
             updateList();
         }
     }
 }
Ejemplo n.º 2
0
        private void addButton_Click(object sender, EventArgs e)
        {
            GamemenuDialog dialog = new GamemenuDialog();

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                XtraMessageBox.Show(dialog.item);
                MenuAction menuAction = new MenuAction(dialog.caption, dialog.item);
                menuAction.inGame     = dialog.ingame;
                menuAction.onlyMulti  = dialog.onlyMulti;
                menuAction.onlySingle = dialog.onlySingle;
                actions.Add(menuAction);
                updateList();
            }
            //actions.Add(new MenuAction("",""));
            //updateList();
        }