예제 #1
0
        //TODO -- make this be ICommand for the enabled
        public ActionMenuItem(IContextualAction action)
        {
            _action = action;

            Header = action.Description;
            this.SetIcon(action.Icon);

            Click += (s, e) => _action.Execute();
        }
예제 #2
0
        //TODO -- make this be ICommand for the enabled
        public ActionMenuItem(IContextualAction action)
        {
            _action = action;

            Header = action.Description;
            this.SetIcon(action.Icon);

            Click += (s, e) => _action.Execute();
        }
예제 #3
0
        public void RunNode(TreeNode node)
        {
            IContextualAction action = null;

            //Something smells.  I can't quite make out what it is.  Oh wait, it's this LSP violation.
            if (node.Subject is Suite)
            {
                action = _screenObjects.CommandForSubject <RunSuiteCommand, Suite>(node.Subject);
            }
            else
            {
                action = _screenObjects.CommandForSubject <RunTestCommand, Test>(node.Subject);
            }
            if (action != null)
            {
                action.Execute();
            }
        }