private void button3_Click(object sender, EventArgs e)
 {
     EventForm ef = new EventForm();
     if (ef.ShowDialog() == DialogResult.OK)
     {
         ObjectEvent ev = new ObjectEvent(ef.EventType, ef.EventNumber);
         AddEvent(ev, true);
     }
 }
Example #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            EventForm ef = new EventForm();

            if (ef.ShowDialog() == DialogResult.OK)
            {
                ObjectEvent ev = new ObjectEvent(ef.EventType, ef.EventNumber);
                AddEvent(ev, true);
            }
        }
Example #3
0
        private void button5_Click(object sender, EventArgs e)
        {
            if (listBox2.SelectedIndex == -1)
            {
                return;
            }
            EventForm ef = new EventForm();
            List <ActionDeclaration> actions = (listBox2.SelectedItem as ObjectEvent).Actions;

            if (ef.ShowDialog() == DialogResult.OK)
            {
                listBox2.BeginUpdate();
                listBox2.Items.RemoveAt(listBox2.SelectedIndex);
                ObjectEvent ev = new ObjectEvent(ef.EventType, ef.EventNumber);
                ev.Actions = actions;
                AddEvent(ev, true);
                listBox2.EndUpdate();
            }
        }
Example #4
0
 private void button5_Click(object sender, EventArgs e)
 {
     if (listBox2.SelectedIndex == -1)
         return;
     EventForm ef = new EventForm();
     List<ActionDeclaration> actions = (listBox2.SelectedItem as ObjectEvent).Actions;
     if (ef.ShowDialog() == DialogResult.OK)
     {
         listBox2.BeginUpdate();
         listBox2.Items.RemoveAt(listBox2.SelectedIndex);
         ObjectEvent ev = new ObjectEvent(ef.EventType, ef.EventNumber);
         ev.Actions = actions;
         AddEvent(ev, true);
         listBox2.EndUpdate();
     }
 }