protected CanExecute ( XenAPI.VM vm ) : bool | ||
vm | XenAPI.VM | |
Результат | bool |
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)); } }
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); } }
private static bool CanExecute(VM vm) { return(vm != null && (CrossPoolCopyVMCommand.CanExecute(vm, null, false) || vm.CanBeCopied())); }