Changeset 6721 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.3/StateLog/StateLogGanttChartListView.cs
- Timestamp:
- 09/08/11 13:41:25 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.3/StateLog/StateLogGanttChartListView.cs
r6373 r6721 65 65 DateTime maxValue = Content.Max(x => x.Count > 0 ? x.Max(y => y.DateTime) : DateTime.MinValue); 66 66 DateTime upperLimit; 67 if (Content.All(x => x.Count > 0 ? (x.Last().State == JobState.Finished || x.Last().State == JobState.Failed || x.Last().State == JobState.Aborted) : true)) {67 if (Content.All(x => x.Count > 0 ? (x.Last().State == TaskState.Finished || x.Last().State == TaskState.Failed || x.Last().State == TaskState.Aborted) : true)) { 68 68 upperLimit = DateTime.FromOADate(Math.Min(DateTime.Now.AddSeconds(10).ToOADate(), maxValue.AddSeconds(10).ToOADate())); 69 69 } else { … … 73 73 for (int i = 0; i < Content.Count; i++) { 74 74 for (int j = 0; j < Content[i].Count - 1; j++) { 75 if (Content[i][j].State != JobState.Offline)75 if (Content[i][j].State != TaskState.Offline) 76 76 AddData(ganttChart, i.ToString(), Content[i][j], Content[i][j + 1], upperLimit); 77 77 } … … 85 85 86 86 public static void SetupCategories(GanttChart ganttChart) { 87 ganttChart.AddCategory( JobState.Offline.ToString(), Color.Gainsboro);88 ganttChart.AddCategory( JobState.Waiting.ToString(), Color.NavajoWhite);89 ganttChart.AddCategory( JobState.Paused.ToString(), Color.PaleVioletRed);90 ganttChart.AddCategory( JobState.Transferring.ToString(), Color.CornflowerBlue);91 ganttChart.AddCategory( JobState.Calculating.ToString(), Color.DarkGreen);92 ganttChart.AddCategory( JobState.Finished.ToString(), Color.White);93 ganttChart.AddCategory( JobState.Aborted.ToString(), Color.Orange);94 ganttChart.AddCategory( JobState.Failed.ToString(), Color.Red);87 ganttChart.AddCategory(TaskState.Offline.ToString(), Color.Gainsboro); 88 ganttChart.AddCategory(TaskState.Waiting.ToString(), Color.NavajoWhite); 89 ganttChart.AddCategory(TaskState.Paused.ToString(), Color.PaleVioletRed); 90 ganttChart.AddCategory(TaskState.Transferring.ToString(), Color.CornflowerBlue); 91 ganttChart.AddCategory(TaskState.Calculating.ToString(), Color.DarkGreen); 92 ganttChart.AddCategory(TaskState.Finished.ToString(), Color.White); 93 ganttChart.AddCategory(TaskState.Aborted.ToString(), Color.Orange); 94 ganttChart.AddCategory(TaskState.Failed.ToString(), Color.Red); 95 95 } 96 96
Note: See TracChangeset
for help on using the changeset viewer.