示例#1
0
        private void addTrigger_Click(object sender, EventArgs e)
        {
            TriggerForm triggerForm = new TriggerForm();

            triggerForm.ShowDialog();
            GetTriggerResult(triggerForm);
        }
示例#2
0
 private void triggersValue_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (triggersValue.SelectedIndex != -1)
     {
         TriggerForm triggerForm = new TriggerForm(_itemTriggers[triggersValue.SelectedIndex].AsBsonDocument);
         triggerForm.ShowDialog();
         GetTriggerResult(triggerForm);
     }
 }
示例#3
0
        private void GetTriggerResult(TriggerForm triggerForm)
        {
            if (triggerForm.DialogResult == System.Windows.Forms.DialogResult.OK)
            {
                _itemTriggers.Add(triggerForm.Trigger);
                triggersValue.Items.Add(triggerForm.Trigger["Trigger"].AsString);
            }
            else if (triggerForm.DialogResult == System.Windows.Forms.DialogResult.Abort)
            {
                if (triggersValue.SelectedIndex != -1)
                {
                    _itemTriggers.RemoveAt(triggersValue.SelectedIndex);
                    triggersValue.Items.RemoveAt(triggersValue.SelectedIndex);
                }
            }
            else
            {
                //do nothing
            }

            triggerForm.Close();
        }
示例#4
0
文件: ItemsTab.cs 项目: vadian/Novus
 private void triggersValue_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (triggersValue.SelectedIndex != -1) {
         TriggerForm triggerForm = new TriggerForm(_itemTriggers[triggersValue.SelectedIndex].AsBsonDocument);
         triggerForm.ShowDialog();
         GetTriggerResult(triggerForm);
     }
 }
示例#5
0
文件: ItemsTab.cs 项目: vadian/Novus
        private void GetTriggerResult(TriggerForm triggerForm)
        {
            if (triggerForm.DialogResult == System.Windows.Forms.DialogResult.OK) {
                _itemTriggers.Add(triggerForm.Trigger);
                triggersValue.Items.Add(triggerForm.Trigger["Trigger"].AsString);
            }
            else if (triggerForm.DialogResult == System.Windows.Forms.DialogResult.Abort) {
                if (triggersValue.SelectedIndex != -1) {
                    _itemTriggers.RemoveAt(triggersValue.SelectedIndex);
                    triggersValue.Items.RemoveAt(triggersValue.SelectedIndex);
                }
            }
            else {
                //do nothing
            }

            triggerForm.Close();
        }
示例#6
0
文件: ItemsTab.cs 项目: vadian/Novus
 private void addTrigger_Click(object sender, EventArgs e)
 {
     TriggerForm triggerForm = new TriggerForm();
     triggerForm.ShowDialog();
     GetTriggerResult(triggerForm);
 }