Example #1
0
        protected override void ExecuteCore(SelectedItemCollection selection)
        {
            Command cmd = new RebootHostCommand(MainWindowCommandInterface, selection);

            if (cmd.CanExecute())
            {
                cmd.Execute();
            }
            else
            {
                cmd = new RebootVMCommand(MainWindowCommandInterface, selection);

                if (cmd.CanExecute())
                {
                    cmd.Execute();
                }
            }
        }
Example #2
0
        protected override void ExecuteCore(SelectedItemCollection selection)
        {
            Command cmd = new RebootHostCommand(MainWindowCommandInterface, selection);

            if (cmd.CanExecute())
            {
                cmd.Execute();
            }
            else
            {
                cmd = new RebootVMCommand(MainWindowCommandInterface, selection);

                if (cmd.CanExecute())
                {
                    cmd.Execute();
                }
            }
        }