public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { JobStepStatus status = (JobStepStatus)value; switch (status) { case JobStepStatus.NotStarted: return(new SolidColorBrush(Colors.White)); break; case JobStepStatus.Running: return(new SolidColorBrush(Color.FromArgb(255, 255, 255, 100))); break; case JobStepStatus.Succeeded: return(new SolidColorBrush(Color.FromArgb(255, 100, 255, 100))); break; case JobStepStatus.Failed: return(new SolidColorBrush(Color.FromArgb(255, 255, 100, 100))); break; } return(null); }
public JobStep(DateTime?startTimeItem, DateTime?endTimeItem, JobStepStatus statusItem) { StartTime = startTimeItem; EndTime = endTimeItem; Status = statusItem; if (Status == JobStepStatus.NotStarted) { PercentComplete = 0; } else { PercentComplete = 100; } tcb = new TimerCallback(JobUpdater); }