Exemple #1
0
 public static string IsStarted(this ClockStatus me)
 {
     if (me?.IsRunning == true)
     {
         return("");
     }
     return("disabled");
 }
Exemple #2
0
 public static string StatusClass(this ClockStatus me)
 {
     if (me?.IsUnavailable != false)
     {
         return("unavailable");
     }
     if (me.IsRealtime)
     {
         return("realtime");
     }
     if (me.IsRunning)
     {
         return("fastclock");
     }
     return("stopped");
 }
Exemple #3
0
        public static string SecondsPerHour(this ClockStatus me)
        {
            var speed = me == null ? 0 : me.Speed;

            return((60 / speed).ToString("F0", CultureInfo.CurrentCulture));
        }