Exemple #1
0
        private void buttonNewTrigger_Click(object sender, System.EventArgs e)
        {
            Trigger         tgr = new Trigger();
            TriggerPropForm frm = new TriggerPropForm(tgr);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                m_tgrm.AddTrigger(tgr);
                InitSidesListBox(tgr);
                InitTriggersListBox(tgr);
            }
        }
Exemple #2
0
        private void buttonModifyTrigger_Click(object sender, System.EventArgs e)
        {
            int n = listBoxTriggers.SelectedIndex;

            if (n < 0)
            {
                return;
            }
            Trigger[]       atgr = m_tgrm.GetTriggerList(GetSideSelected());
            Trigger         tgr  = atgr[n].Clone();
            TriggerPropForm frm  = new TriggerPropForm(tgr);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                m_tgrm.ModifyTrigger(atgr[n], tgr);
                InitSidesListBox(tgr);
                InitTriggersListBox(tgr);
            }
        }
 private void buttonNewTrigger_Click(object sender, System.EventArgs e)
 {
     Trigger tgr = new Trigger();
     TriggerPropForm frm = new TriggerPropForm(tgr);
     if (frm.ShowDialog() == DialogResult.OK) {
         m_tgrm.AddTrigger(tgr);
         InitSidesListBox(tgr);
         InitTriggersListBox(tgr);
     }
 }
 private void buttonModifyTrigger_Click(object sender, System.EventArgs e)
 {
     int n = listBoxTriggers.SelectedIndex;
     if (n < 0)
         return;
     Trigger[] atgr = m_tgrm.GetTriggerList(GetSideSelected());
     Trigger tgr = atgr[n].Clone();
     TriggerPropForm frm = new TriggerPropForm(tgr);
     if (frm.ShowDialog() == DialogResult.OK) {
         m_tgrm.ModifyTrigger(atgr[n], tgr);
         InitSidesListBox(tgr);
         InitTriggersListBox(tgr);
     }
 }