Пример #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();
                }
            }
        }
Пример #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();
                }
            }
        }