public override bool IsValid(SelectedItemCollection selection) { return(selection.ContainsOneItemOfType <XenAPI.Network>() && !(selection.FirstAsXenObject as XenAPI.Network).IsGuestInstallerNetwork()); // CA-218956 - Expose HIMN when showing hidden objects // HIMN should not be editable }
protected override bool CanExecuteCore(SelectedItemCollection selection) { if (selection.AllItemsAre <VM>() && new CrossPoolMoveVMCommand(MainWindowCommandInterface, selection).CanExecute()) { return(true); } return(selection.ContainsOneItemOfType <VM>() && selection.AtLeastOneXenObjectCan <VM>(CanExecute)); }
protected override bool CanExecuteCore(SelectedItemCollection selection) { if (selection.ContainsOneItemOfType <IXenObject>()) { IXenObject xenObject = selection[0].XenObject; return(!(xenObject is Folder) && xenObject.Connection != null && xenObject.Connection.IsConnected); } return(false); }
protected override bool CanExecuteCore(SelectedItemCollection selection) { if (_slr != null && selection.ContainsOneItemOfType <VDI>()) { VDI vdi = (VDI)selection[0].XenObject; var deleteCommand = new DeleteVirtualDiskCommand(MainWindowCommandInterface, vdi); return(vdi.sm_config.ContainsKey("SVID") && !string.IsNullOrEmpty(vdi.sm_config["SVID"]) && deleteCommand.CanExecute()); } return(false); }
/// <summary> /// Installs tools on the single VM selected. /// </summary> /// <returns>The <see cref="AsyncAction"/> for the Command.</returns> public AsyncAction ExecuteGetAction() { SelectedItemCollection selection = GetSelection(); if (selection.Count > 1) { throw new InvalidOperationException("This method can only be used with a single VM selected."); } if (selection.ContainsOneItemOfType <VM>()) { VM vm = (VM)selection[0].XenObject; if (CanExecute(vm)) { return(SingleVMExecute(vm)); } } return(null); }
protected override bool CanExecuteCore(SelectedItemCollection selection) { return(selection.ContainsOneItemOfType <Host>() && selection.AtLeastOneXenObjectCan <Host>(CanExecute)); }
protected override bool CanExecuteCore(SelectedItemCollection selection) { return(selection.AllItemsAre <VM>(CBTDisabled) && (new CrossPoolMoveVMCommand(MainWindowCommandInterface, selection).CanExecute() || selection.ContainsOneItemOfType <VM>(CanExecute))); }
protected override bool CanExecuteCore(SelectedItemCollection selection) { return(selection.ContainsOneItemOfType <VM>() && selection.AtLeastOneXenObjectCan <VM>(v => v.is_a_snapshot)); }
public override bool IsValid(SelectedItemCollection selection) { return(selection.ContainsOneItemOfType <Folder>()); }
protected override bool CanExecuteCore(SelectedItemCollection selection) { return(selection.ContainsOneItemOfType <SR>(sr => sr.StorageLinkRepository(Program.StorageLinkConnections) != null) || selection.ContainsOneItemOfType <StorageLinkRepository>()); }
public override bool IsValid(SelectedItemCollection selection) { return(selection.ContainsOneItemOfType <XenAPI.Network>()); }
protected override bool CanExecuteCore(SelectedItemCollection selection) { return(selection.ContainsOneItemOfType <Folder>() && ConnectionAvailable()); }
protected override bool CanExecuteCore(SelectedItemCollection selection) { return((selection.ContainsOneItemOfType <Folder>() || selection.ContainsOneItemOfType <GroupingTag>(t => t.Grouping is OrganizationViewFolders)) && ConnectionAvailable()); }
public override bool IsValid(SelectedItemCollection selection) { return selection.ContainsOneItemOfType<Pool>(); }
public override bool IsValid(SelectedItemCollection selection) { return(selection.ContainsOneItemOfType <StorageLinkPool>()); }
protected override bool CanExecuteCore(SelectedItemCollection selection) { return(selection.ContainsOneItemOfType <GroupingTag>(CanExecute)); }