예제 #1
0
 private string TimeSpanAsText(TimeSpan timespan, OvertimeStatus overtimeStatus)
 {
     if (overtimeStatus == OvertimeStatus.Normal)
     {
         return(((int)timespan.TotalMinutes).ToString());
     }
     return(TimeboxEnforcer.DurationAsText(timespan));
 }
 private string TimeSpanAsText(TimeSpan timespan, OvertimeStatus overtimeStatus)
 {
     if (overtimeStatus == OvertimeStatus.Normal)
     {
         return ((int)timespan.TotalMinutes).ToString();
     }
     return TimeboxEnforcer.DurationAsText(timespan);
 }
 private Color GetForecolor(OvertimeStatus overtimeStatus)
 {
     switch (overtimeStatus)
     {
         case OvertimeStatus.Normal:
             return Color.White;
         case OvertimeStatus.Warning:
             return Color.Yellow;
         case OvertimeStatus.Overtime:
             return Color.Red;
         default:
             throw new SosException("Unknown status: " + overtimeStatus);
     }
 }
예제 #4
0
        private Color GetForecolor(OvertimeStatus overtimeStatus)
        {
            switch (overtimeStatus)
            {
            case OvertimeStatus.Normal:
                return(Color.White);

            case OvertimeStatus.Warning:
                return(Color.Yellow);

            case OvertimeStatus.Overtime:
                return(Color.Red);

            default:
                throw new SosException("Unknown status: " + overtimeStatus);
            }
        }
예제 #5
0
 public void UpdateText(TimeSpan timespan, OvertimeStatus overtimeStatus)
 {
     _label.Text      = TimeSpanAsText(timespan, overtimeStatus);
     _label.ForeColor = GetForecolor(overtimeStatus);
 }
 public void UpdateText(TimeSpan timespan, OvertimeStatus overtimeStatus)
 {
     _label.Text = TimeSpanAsText(timespan, overtimeStatus);
     _label.ForeColor = GetForecolor(overtimeStatus);
 }