Esempio n. 1
0
        protected override void ExecuteCore(SelectedItemCollection selection)
        {
            Command cmd = new ShutDownHostCommand(MainWindowCommandInterface, selection);

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

                if (cmd.CanExecute())
                {
                    cmd.Execute();
                }
            }
        }
Esempio n. 2
0
        protected override void ExecuteCore(SelectedItemCollection selection)
        {
            Command cmd = new ShutDownHostCommand(MainWindowCommandInterface, selection);

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

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