Exemple #1
0
        public void Execute(object parameter)
        {
            if (!(parameter is RegexRule regexRule))
            {
                return;
            }

            ConfirmationDialogView confirmationDialogView = new ConfirmationDialogView
                                                            (
                new ConfirmationDialog.Model.ConfirmationDialogInfo
            {
                Title  = $"Delete { regexRule.RuleName }?",
                Header = $"Warning: Deleted Rules Cannot Be Retrieved",
                Body   = "Please confirm that you would like to delete this rule."
            }
                                                            );

            confirmationDialogView.ShowDialog();
            if (confirmationDialogView.DialogResult != true)
            {
                return;
            }

            RegexRule.Delete(ruleManagerViewModel.DocumentGuid, regexRule);
        }