public void AddRule(Policy policy) { var addRuleView = new AddRule(policy); var dialog = DialogBuilder.For(addRuleView).Build(); addRuleView.AddRuleSuccess += (s, e) => { dialog.SetDialogResult(true); }; dialog.ShowDialog(); }
public void EditRule(Policy policy, Rule rule) { var editRuleView = new AddRule(policy, rule) { Tag = Properties.Resources.LblEditRule }; var dialog = DialogBuilder.For(editRuleView).Build(); editRuleView.AddRuleSuccess += (s, e) => { dialog.SetDialogResult(true); }; dialog.ShowDialog(); }
public AddRule(Policy policy, Rule rule = null) { InitializeComponent(); TxtValue.CurrentHighlighter = HighlighterManager.Instance.Highlighters["RuleSyntax"]; TxtException.CurrentHighlighter = HighlighterManager.Instance.Highlighters["RuleSyntax"]; var presenter = new AddRulePresenter(this, policy, rule); EntitySelector.ItemFilter += presenter.FilterEntities; DataContext = presenter; InitializeErrorMessage(); _loadingControl = new LoadingControl { Orientation = Orientation.Vertical }; Loaded += (s, e) => { ValidationErrorsAssistant.ClearErrors(RootPanel); }; }
public PolicyDetails(Policy policy) { InitializeComponent(); DataContext = new PolicyDetailsPresenter(this, policy); }