Exemplo n.º 1
0
        public bool Execute([NotNull] IIdentity identity)
        {
            bool result = false;

            if (identity is IThreatEvent threatEvent)
            {
                using (var dialog = new ItemEditorDialog())
                {
                    dialog.SetExecutionMode(_executionMode);
                    dialog.Item = threatEvent.ThreatType;
                    dialog.ShowDialog(Form.ActiveForm);
                }
                result = true;
            }

            return(result);
        }
Exemplo n.º 2
0
        public bool Execute(IThreatTypeMitigation ttMitigation)
        {
            bool result = false;

            if (ttMitigation != null)
            {
                using (var dialog = new ItemEditorDialog())
                {
                    dialog.SetExecutionMode(_executionMode);
                    dialog.Item = ttMitigation.Mitigation;
                    dialog.ShowDialog(Form.ActiveForm);
                }
                result = true;
            }

            return(result);
        }