상속: XenAdmin.Commands.CrossPoolMigrateCommand
예제 #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));
            }
        }
예제 #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);
            }
        }
예제 #3
0
 private static bool CanExecute(VM vm)
 {
     return(vm != null && (CrossPoolCopyVMCommand.CanExecute(vm, null, false) || vm.CanBeCopied()));
 }