Compare commits

..
2 Commits
Author SHA1 Message Date
sc 35ca13ded3 页面修改 2025-04-27 17:05:36 +08:00
sc 5f7c6bee47 修改信息页面MonitorView的显示逻辑,添加当前步骤高亮显示 2025-04-27 16:59:27 +08:00
3 changed files with 24 additions and 6 deletions

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ConvertMoels
if (i == "201") return "#FF00FF00"; if (i == "201") return "#FF00FF00";
else if (i == "202") return "#FFFFFF00"; else if (i == "202") return "#FFFFFF00";
else if (i == "309") return "#FFFF0000"; else if (i == "309") return "#FFFFFFFF";
else if (i == "800") return "#FFFF0000"; else if (i == "800") return "#FFFF0000";
else return "#FF000000"; else return "#FF000000";
} }
+16 -3
View File
@@ -41,6 +41,9 @@
<Setter Property="Background" Value="#FFF0F0F0" /> <Setter Property="Background" Value="#FFF0F0F0" />
</Trigger> </Trigger>
<Trigger Property="IsMouseOver" Value="False"/> <Trigger Property="IsMouseOver" Value="False"/>
<DataTrigger Binding="{Binding State}" Value="309">
<Setter Property="Background" Value="Red"/>
</DataTrigger>
</Style.Triggers> </Style.Triggers>
</Style> </Style>
</DataGrid.RowStyle> </DataGrid.RowStyle>
@@ -104,10 +107,11 @@
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" Background="White" HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" Background="White"
GridLinesVisibility="All" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" BorderBrush="{x:Null}" GridLinesVisibility="All" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" BorderBrush="{x:Null}"
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False" CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False"
CanUserDeleteRows="False" SelectionMode="Single" FontSize="15" Focusable="True" ContextMenuOpening="Gridstep_ContextMenuOpening"> CanUserDeleteRows="False" SelectionMode="Single" FontSize="15" Focusable="True" >
<DataGrid.RowStyle> <DataGrid.RowStyle >
<Style TargetType="{x:Type DataGridRow}"> <Style TargetType="{x:Type DataGridRow}">
<Setter Property="IsHitTestVisible" Value="{Binding DataContext.IsInteractive,RelativeSource={RelativeSource AncestorType=DataGrid}}"/> <Setter Property="IsHitTestVisible" Value="{Binding DataContext.IsInteractive,
RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
<Setter Property="Height" Value="30" /> <Setter Property="Height" Value="30" />
<Setter Property="FontSize" Value="25" /> <Setter Property="FontSize" Value="25" />
<Style.Triggers> <Style.Triggers>
@@ -118,6 +122,15 @@
<Setter Property="Background" Value="#FFF0F0F0" /> <Setter Property="Background" Value="#FFF0F0F0" />
</Trigger> </Trigger>
<Trigger Property="IsMouseOver" Value="False"/> <Trigger Property="IsMouseOver" Value="False"/>
<DataTrigger Binding="{Binding RUN}" Value="1">
<Setter Property="Background" Value="#FF00D6FF"/>
</DataTrigger>
<DataTrigger Binding="{Binding RUN}" Value="2">
<Setter Property="Background" Value="Yellow"/>
</DataTrigger>
<DataTrigger Binding="{Binding RUN}" Value="9">
<Setter Property="Background" Value="Red"/>
</DataTrigger>
</Style.Triggers> </Style.Triggers>
</Style> </Style>
</DataGrid.RowStyle> </DataGrid.RowStyle>
+7 -2
View File
@@ -66,6 +66,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
dyelot= MainWindowViewModel.dyelot; dyelot= MainWindowViewModel.dyelot;
machin_LOG.Text = MainWindowViewModel.machin_LOG; machin_LOG.Text = MainWindowViewModel.machin_LOG;
IsInteractive = false; IsInteractive = false;
DATA_view();
} }
private string machine; private string machine;
@@ -74,7 +75,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
private int machines_info=0; private int machines_info=0;
public static string Sys_log; public static string Sys_log;
private void Griddata_SelectionChanged(object sender, SelectionChangedEventArgs e)//设备列表 private void Griddata_SelectionChanged(object sender, SelectionChangedEventArgs e)//设备列表
{ {
Stop.IsEnabled = true; Stop.IsEnabled = true;
@@ -557,7 +557,11 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
{ {
if (MainWindowViewModel.dt_TP.Rows.Count >= 0) if (MainWindowViewModel.dt_TP.Rows.Count >= 0)
{ {
if (TechnologicalProcess_bool) TechnologicalProcess_View = ToObservableCollection<TechnologicalP>(MainWindowViewModel.dt_TP); if (TechnologicalProcess_bool)
{
TechnologicalProcess_View = ToObservableCollection<TechnologicalP>(MainWindowViewModel.dt_TP);
}
Sys_machine = MainWindowViewModel.MachineLOG; Sys_machine = MainWindowViewModel.MachineLOG;
} }
} }
@@ -601,6 +605,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
} }
public class TechnologicalP public class TechnologicalP
{ {
public int RUN { get; set; }
public string ProgramID { get; set; } public string ProgramID { get; set; }
public string Program { get; set; } public string Program { get; set; }
public double Step { get; set; } public double Step { get; set; }