Inheritance: XenAdmin.Commands.CrossPoolMigrateCommand
Beispiel #1
0
        protected override void ExecuteCore(SelectedItemCollection selection)
        {
            VM vm = (VM)selection[0].XenObject;

            if (CrossPoolCopyVMCommand.CanExecute(vm, null, false))
            {
                new CrossPoolCopyVMCommand(MainWindowCommandInterface, selection).Execute();
            }
            else
            {
                MainWindowCommandInterface.ShowPerXenModelObjectWizard(vm, new CopyVMDialog(vm));
            }
        }
Beispiel #2
0
        protected override void ExecuteCore(SelectedItemCollection selection)
        {
            VM vm = (VM)selection[0].XenObject;

            if (CrossPoolCopyVMCommand.CanExecute(vm, null))
            {
                new CrossPoolCopyVMCommand(MainWindowCommandInterface, selection).Execute();
            }
            else
            {
                new CopyVMDialog(vm).ShowPerXenObject(vm, Program.MainWindow);
            }
        }
Beispiel #3
0
 private static bool CanExecute(VM vm)
 {
     return(vm != null && (CrossPoolCopyVMCommand.CanExecute(vm, null, false) || vm.CanBeCopied()));
 }