Esempio n. 1
0
 private void btn_create_Click(object sender, EventArgs e)
 {
     NewAction form = new NewAction();
     DialogResult result = form.ShowDialog();
     if (result == DialogResult.OK)
     {
         event_data.actions.Add(form.action_data);
         update_actions();
     }
 }
Esempio n. 2
0
 private void btn_edit_Click(object sender, EventArgs e)
 {
     if (event_data.actions.Count > list_actions.SelectedIndex && list_actions.SelectedIndex >= 0)
     {
         NewAction form = new NewAction(event_data.actions[list_actions.SelectedIndex]);
         DialogResult result = form.ShowDialog();
         if (result == DialogResult.OK)
         {
             event_data.actions[list_actions.SelectedIndex] = form.action_data;
             update_actions();
         }
     }
 }