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 != "");
 }
Beispiel #2
0
        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));
        }
Beispiel #3
0
 private static bool CanExecute(Host host)
 {
     return(host != null && host.IsLive() && !HelpersGUI.HasActiveHostAction(host));
 }
Beispiel #4
0
 private static bool CanExecuteOnHost(Host host)
 {
     return(host != null && host.Connection.IsConnected && !HelpersGUI.HasActiveHostAction(host));
 }