public void NotifyRule(Priv10Engine.ChangeArgs args) { if (this.RuleNotify.Add(args)) { ShowTab(this.ruleTab); } }
public void NotifyRule(Priv10Engine.ChangeArgs args) { this.ruleTab.IsEnabled = true; tabs.SelectedItem = this.ruleTab; tabItems[this.ruleTab].state = STab.EState.eNew; //tabItems[this.ruleTab].state = tabs.SelectedItem != this.ruleTab ? STab.EState.eNew : STab.EState.eFilled; if (this.RuleNotify.Add(args)) { ShowWnd(); } }
public bool Add(Priv10Engine.ChangeArgs args) { foreach (FirewallRuleList.RuleItem item in rulesGrid.Items) { if (item.Rule.guid == args.rule.guid) { item.Update(args.rule); return(false); } } rulesGrid.Items.Add(new FirewallRuleList.RuleItem(args.rule, args.prog)); UpdateState(); return(true); }