private static bool CanExecute(Host host) { return(host != null && !host.IsLive && host.allowed_operations != null && host.allowed_operations.Contains(host_allowed_operations.power_on) && !HelpersGUI.HasActiveHostAction(host) && host.power_on_mode != ""); }
protected override string GetCantExecuteReasonCore(IXenObject item) { Host host = item as Host; if (host == null) { return(base.GetCantExecuteReasonCore(item)); } if (!host.IsLive()) { return(Messages.HOST_ALREADY_SHUT_DOWN); } else if (HelpersGUI.HasActiveHostAction(host)) { return(Messages.HOST_ACTION_IN_PROGRESS); } return(base.GetCantExecuteReasonCore(item)); }
private static bool CanExecute(Host host) { return(host != null && host.IsLive() && !HelpersGUI.HasActiveHostAction(host)); }
private static bool CanExecuteOnHost(Host host) { return(host != null && host.Connection.IsConnected && !HelpersGUI.HasActiveHostAction(host)); }