private void GlobRuleAdd() { var frm = new RuleEditFrm(null, true); var res = frm.ShowDialog(); if (res == DialogResult.OK) { Result.GlobalExcludeRules.Add(frm.Result); RefreshAllGlobRules(); } }
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(); } } }