示例#1
0
        private void GlobRuleAdd()
        {
            var frm = new RuleEditFrm(null, true);
            var res = frm.ShowDialog();

            if (res == DialogResult.OK)
            {
                Result.GlobalExcludeRules.Add(frm.Result);
                RefreshAllGlobRules();
            }
        }
示例#2
0
 private void GlobRuleEdit()
 {
     if (GlobalRulesLV.SelectedIndices.Count == 1)
     {
         int ndx = GlobalRulesLV.SelectedIndices[0];
         var frm = new RuleEditFrm(Result.GlobalExcludeRules[ndx], false);
         var res = frm.ShowDialog();
         if (res == DialogResult.OK)
         {
             Result.GlobalExcludeRules[ndx] = frm.Result;
             GlobalRulesTB.Text             = Result.GlobalExcludeRules[ndx].RuleCode;
             RefreshAllGlobRules();
         }
     }
 }