Exemplo n.º 1
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);
     }
 }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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();
            }
        }
Exemplo n.º 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();
     }
 }