Example #1
0
 private void btnAddCondition_Click(object sender, EventArgs e)
 {
     using (var form = new RuleConditionForm())
     {
         var result = form.ShowDialog();
         if (result == DialogResult.OK)
         {
             RuleCondition condition = form.Condition;
             conditionsControl.AddCondition(condition);
             //MonkeyIO.SaveCondition(condition);
         }
     }
 }
Example #2
0
        private void btnEditCondition_Click(object sender, EventArgs e)
        {
            RuleCondition selectedCondition = conditionsControl.SelectedCondition;

            if (selectedCondition == null)
            {
                return;
            }

            using (var form = new RuleConditionForm(selectedCondition))
            {
                var result = form.ShowDialog();
                if (result == DialogResult.OK)
                {
                    RuleCondition updatedCondition = form.Condition;
                    conditionsControl.UpdateCondition(selectedCondition, updatedCondition);
                }
            }
        }