|
|
@ -109,11 +109,19 @@ namespace SunlightCentralizedControlManagement_SCCM_.View |
|
|
|
|
|
|
|
for (int j = 0; j < dataRows.Count(); j++) //列表排程
|
|
|
|
{ |
|
|
|
System.Windows.Media.Color colorBackground = (System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#FF336FA8"); |
|
|
|
try |
|
|
|
{ |
|
|
|
colorBackground = (System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#"+dataRows[j].Field<string>("color")); |
|
|
|
} |
|
|
|
catch (Exception) { } |
|
|
|
//FF336FA8
|
|
|
|
GanttChart.AddGanttTask(row, new GanttTask() |
|
|
|
{ |
|
|
|
Start = DateTime.Parse(dataRows[j].Field<string>("StartTime")), |
|
|
|
End = DateTime.Parse(dataRows[j].Field<string>("EndTime")), |
|
|
|
Name = Properties.Resources.ProcessName + ";" + dataRows[j].Field<string>("ProgramName"), |
|
|
|
Background = colorBackground, |
|
|
|
TaskProgressVisibility = System.Windows.Visibility.Hidden |
|
|
|
}); |
|
|
|
} |
|
|
|