条目背景色
This commit is contained in:
commit
b278a10f9f
2 files changed
+9
-1
No files matched your search
@@ -21,7 +21,7 @@
|
|||||||
<TextBlock HorizontalAlignment="Left" Height="40" Margin="10,80,0,0" TextWrapping="Wrap" Text="{x:Static lang:Resources.process}"
|
<TextBlock HorizontalAlignment="Left" Height="40" Margin="10,80,0,0" TextWrapping="Wrap" Text="{x:Static lang:Resources.process}"
|
||||||
VerticalAlignment="Top" Width="120" FontSize="25"/>
|
VerticalAlignment="Top" Width="120" FontSize="25"/>
|
||||||
<ComboBox HorizontalAlignment="Left" Height="30" Margin="150,130,0,0" x:Name="comboBoxDyelot" VerticalAlignment="Top" Width="270"
|
<ComboBox HorizontalAlignment="Left" Height="30" Margin="150,130,0,0" x:Name="comboBoxDyelot" VerticalAlignment="Top" Width="270"
|
||||||
FontSize="15" IsEditable="True" BorderBrush="#FF673AB7" />
|
FontSize="15" IsEditable="True" BorderBrush="#FF673AB7" Background="White" />
|
||||||
<TextBlock HorizontalAlignment="Left" Height="40" Margin="10,130,0,0" TextWrapping="Wrap" Text="{x:Static lang:Resources.Dyelot}"
|
<TextBlock HorizontalAlignment="Left" Height="40" Margin="10,130,0,0" TextWrapping="Wrap" Text="{x:Static lang:Resources.Dyelot}"
|
||||||
VerticalAlignment="Top" Width="120" FontSize="25"/>
|
VerticalAlignment="Top" Width="120" FontSize="25"/>
|
||||||
<DataGrid x:Name="Grid_data" AlternationCount="2" IsReadOnly="True" d:ItemsSource="{d:SampleData ItemCount=90}"
|
<DataGrid x:Name="Grid_data" AlternationCount="2" IsReadOnly="True" d:ItemsSource="{d:SampleData ItemCount=90}"
|
||||||
|
|||||||
@@ -109,11 +109,19 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
|
|
||||||
for (int j = 0; j < dataRows.Count(); j++) //列表排程
|
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()
|
GanttChart.AddGanttTask(row, new GanttTask()
|
||||||
{
|
{
|
||||||
Start = DateTime.Parse(dataRows[j].Field<string>("StartTime")),
|
Start = DateTime.Parse(dataRows[j].Field<string>("StartTime")),
|
||||||
End = DateTime.Parse(dataRows[j].Field<string>("EndTime")),
|
End = DateTime.Parse(dataRows[j].Field<string>("EndTime")),
|
||||||
Name = Properties.Resources.ProcessName + ";" + dataRows[j].Field<string>("ProgramName"),
|
Name = Properties.Resources.ProcessName + ";" + dataRows[j].Field<string>("ProgramName"),
|
||||||
|
Background = colorBackground,
|
||||||
TaskProgressVisibility = System.Windows.Visibility.Hidden
|
TaskProgressVisibility = System.Windows.Visibility.Hidden
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user