|
@@ -49,7 +49,7 @@
|
|
|
Background="{DynamicResource DangerBrush}" CornerRadius="12" Padding="9,4">
|
|
Background="{DynamicResource DangerBrush}" CornerRadius="12" Padding="9,4">
|
|
|
<StackPanel Orientation="Horizontal" Spacing="6" VerticalAlignment="Center">
|
|
<StackPanel Orientation="Horizontal" Spacing="6" VerticalAlignment="Center">
|
|
|
<Border Width="8" Height="8" CornerRadius="4" Background="White"/>
|
|
<Border Width="8" Height="8" CornerRadius="4" Background="White"/>
|
|
|
- <TextBlock Text="报警" FontFamily="{DynamicResource MonoFont}" FontSize="10"
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding AlarmBadgeText}" FontFamily="{DynamicResource MonoFont}" FontSize="10"
|
|
|
Foreground="White" VerticalAlignment="Center"/>
|
|
Foreground="White" VerticalAlignment="Center"/>
|
|
|
<TextBlock Text="{Binding ActiveAlarmCount}" FontFamily="Consolas, monospace"
|
|
<TextBlock Text="{Binding ActiveAlarmCount}" FontFamily="Consolas, monospace"
|
|
|
FontSize="13" FontWeight="Bold"
|
|
FontSize="13" FontWeight="Bold"
|
|
@@ -78,7 +78,7 @@
|
|
|
<Grid RowDefinitions="Auto,*">
|
|
<Grid RowDefinitions="Auto,*">
|
|
|
<StackPanel Grid.Row="0" Orientation="Horizontal" Spacing="8" Margin="14,10,14,6">
|
|
<StackPanel Grid.Row="0" Orientation="Horizontal" Spacing="8" Margin="14,10,14,6">
|
|
|
<Border Background="{DynamicResource SuccessBrush}" Width="3" Height="16" CornerRadius="1"/>
|
|
<Border Background="{DynamicResource SuccessBrush}" Width="3" Height="16" CornerRadius="1"/>
|
|
|
- <TextBlock Text="工艺流程" FontFamily="Consolas, monospace" FontSize="12"
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding ProcessFlowTitleText}" FontFamily="Consolas, monospace" FontSize="12"
|
|
|
FontWeight="Bold" Foreground="{DynamicResource TextSecondaryBrush}"/>
|
|
FontWeight="Bold" Foreground="{DynamicResource TextSecondaryBrush}"/>
|
|
|
<!-- 2D/3D 切换按钮组:仅在配置启用 3D 时显示 -->
|
|
<!-- 2D/3D 切换按钮组:仅在配置启用 3D 时显示 -->
|
|
|
<StackPanel Orientation="Horizontal" Spacing="4" Margin="8,0,0,0"
|
|
<StackPanel Orientation="Horizontal" Spacing="4" Margin="8,0,0,0"
|
|
@@ -96,30 +96,31 @@
|
|
|
Profile="{Binding Profile}"
|
|
Profile="{Binding Profile}"
|
|
|
AnalogValues="{Binding AnalogValues}"
|
|
AnalogValues="{Binding AnalogValues}"
|
|
|
DigitalValues="{Binding DigitalValues}"
|
|
DigitalValues="{Binding DigitalValues}"
|
|
|
- DeviceClickedCommand="{Binding OnDeviceClickedCommand}"/>
|
|
|
|
|
|
|
+ DeviceClickedCommand="{Binding DeviceClickedCommand}"/>
|
|
|
<controls:PumpStation3DControl
|
|
<controls:PumpStation3DControl
|
|
|
IsVisible="{Binding Is3DView}"
|
|
IsVisible="{Binding Is3DView}"
|
|
|
Profile="{Binding Profile}"
|
|
Profile="{Binding Profile}"
|
|
|
AnalogValues="{Binding AnalogValues}"
|
|
AnalogValues="{Binding AnalogValues}"
|
|
|
DigitalValues="{Binding DigitalValues}"
|
|
DigitalValues="{Binding DigitalValues}"
|
|
|
- DeviceClickedCommand="{Binding OnDeviceClickedCommand}"/>
|
|
|
|
|
|
|
+ DeviceClickedCommand="{Binding DeviceClickedCommand}"/>
|
|
|
|
|
|
|
|
<!-- 泵操作浮层:点击图内泵弹出(防误触,不再直接启停) -->
|
|
<!-- 泵操作浮层:点击图内泵弹出(防误触,不再直接启停) -->
|
|
|
<Border IsVisible="{Binding IsPumpPopupOpen}"
|
|
<Border IsVisible="{Binding IsPumpPopupOpen}"
|
|
|
Background="#80000000" CornerRadius="5">
|
|
Background="#80000000" CornerRadius="5">
|
|
|
<Border Width="270" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
<Border Width="270" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
Background="{DynamicResource SurfaceBgBrush}" CornerRadius="8" Padding="16,12"
|
|
Background="{DynamicResource SurfaceBgBrush}" CornerRadius="8" Padding="16,12"
|
|
|
- BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1">
|
|
|
|
|
|
|
+ BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1"
|
|
|
|
|
+ DataContext="{Binding SelectedPump}">
|
|
|
<StackPanel Spacing="8">
|
|
<StackPanel Spacing="8">
|
|
|
<!-- 标题 + 关闭 -->
|
|
<!-- 标题 + 关闭 -->
|
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
|
|
<Border Width="10" Height="10" CornerRadius="5" VerticalAlignment="Center"
|
|
<Border Width="10" Height="10" CornerRadius="5" VerticalAlignment="Center"
|
|
|
- Background="{Binding SelectedPump.IsRunning, Converter={x:Static conv:BoolConverters.ToBrush}}"/>
|
|
|
|
|
- <TextBlock Text="{Binding SelectedPump.Name}" FontSize="15" FontWeight="Bold"
|
|
|
|
|
|
|
+ Background="{Binding IsRunning, Converter={x:Static conv:BoolConverters.ToBrush}}"/>
|
|
|
|
|
+ <TextBlock Text="{Binding Name}" FontSize="15" FontWeight="Bold"
|
|
|
Foreground="{DynamicResource TextPrimaryBrush}"/>
|
|
Foreground="{DynamicResource TextPrimaryBrush}"/>
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
- <Button Grid.Column="1" Content="✕" Command="{Binding ClosePumpPopupCommand}"
|
|
|
|
|
|
|
+ <Button Grid.Column="1" Content="✕" Click="OnClosePumpPopupClick"
|
|
|
Padding="6,2" FontSize="11"/>
|
|
Padding="6,2" FontSize="11"/>
|
|
|
</Grid>
|
|
</Grid>
|
|
|
|
|
|
|
@@ -128,52 +129,52 @@
|
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1">
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1">
|
|
|
<StackPanel Spacing="4">
|
|
<StackPanel Spacing="4">
|
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
|
- <TextBlock Text="运行状态" FontSize="11" Foreground="{DynamicResource TextTertiaryBrush}"/>
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding RunningStatusText}" FontSize="11" Foreground="{DynamicResource TextTertiaryBrush}"/>
|
|
|
<TextBlock Grid.Column="1" FontFamily="Consolas, monospace" FontSize="12" FontWeight="Bold"
|
|
<TextBlock Grid.Column="1" FontFamily="Consolas, monospace" FontSize="12" FontWeight="Bold"
|
|
|
Foreground="{DynamicResource SuccessBrush}"
|
|
Foreground="{DynamicResource SuccessBrush}"
|
|
|
- IsVisible="{Binding SelectedPump.IsRunning}" Text="运行中"/>
|
|
|
|
|
|
|
+ IsVisible="{Binding IsRunning}" Text="{Binding RunningText}"/>
|
|
|
<TextBlock Grid.Column="1" FontFamily="Consolas, monospace" FontSize="12"
|
|
<TextBlock Grid.Column="1" FontFamily="Consolas, monospace" FontSize="12"
|
|
|
Foreground="{DynamicResource TextSecondaryBrush}"
|
|
Foreground="{DynamicResource TextSecondaryBrush}"
|
|
|
- IsVisible="{Binding !SelectedPump.IsRunning}" Text="已停止"/>
|
|
|
|
|
|
|
+ IsVisible="{Binding !IsRunning}" Text="{Binding StoppedText}"/>
|
|
|
</Grid>
|
|
</Grid>
|
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
|
- <TextBlock Text="电流" FontSize="11" Foreground="{DynamicResource TextTertiaryBrush}"/>
|
|
|
|
|
- <TextBlock Grid.Column="1" Text="{Binding SelectedPump.Current, StringFormat='{}{0:F1} A'}"
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding CurrentLabelText}" FontSize="11" Foreground="{DynamicResource TextTertiaryBrush}"/>
|
|
|
|
|
+ <TextBlock Grid.Column="1" Text="{Binding Current, StringFormat='{}{0:F1} A'}"
|
|
|
FontFamily="Consolas, monospace" FontSize="12" FontWeight="Bold"
|
|
FontFamily="Consolas, monospace" FontSize="12" FontWeight="Bold"
|
|
|
Foreground="{DynamicResource SuccessBrush}"/>
|
|
Foreground="{DynamicResource SuccessBrush}"/>
|
|
|
</Grid>
|
|
</Grid>
|
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
|
- <TextBlock Text="日台时" FontSize="11" Foreground="{DynamicResource TextTertiaryBrush}"/>
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding DailyHoursLabelText}" FontSize="11" Foreground="{DynamicResource TextTertiaryBrush}"/>
|
|
|
<TextBlock Grid.Column="1" FontFamily="Consolas, monospace" FontSize="12"
|
|
<TextBlock Grid.Column="1" FontFamily="Consolas, monospace" FontSize="12"
|
|
|
Foreground="{DynamicResource TextSecondaryBrush}">
|
|
Foreground="{DynamicResource TextSecondaryBrush}">
|
|
|
<TextBlock.Text>
|
|
<TextBlock.Text>
|
|
|
<MultiBinding StringFormat="{}{0:F0}h {1:F0}m">
|
|
<MultiBinding StringFormat="{}{0:F0}h {1:F0}m">
|
|
|
- <Binding Path="SelectedPump.DailyHours"/>
|
|
|
|
|
- <Binding Path="SelectedPump.DailyMinutes"/>
|
|
|
|
|
|
|
+ <Binding Path="DailyHours"/>
|
|
|
|
|
+ <Binding Path="DailyMinutes"/>
|
|
|
</MultiBinding>
|
|
</MultiBinding>
|
|
|
</TextBlock.Text>
|
|
</TextBlock.Text>
|
|
|
</TextBlock>
|
|
</TextBlock>
|
|
|
</Grid>
|
|
</Grid>
|
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
|
- <TextBlock Text="控制模式" FontSize="11" Foreground="{DynamicResource TextTertiaryBrush}"/>
|
|
|
|
|
- <TextBlock Grid.Column="1" Text="{Binding SelectedPump.IsCentralMode, Converter={x:Static conv:BoolConverters.ToModeText}}"
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding ControlModeLabelText}" FontSize="11" Foreground="{DynamicResource TextTertiaryBrush}"/>
|
|
|
|
|
+ <TextBlock Grid.Column="1" Text="{Binding IsCentralMode, Converter={x:Static conv:BoolConverters.ToModeText}}"
|
|
|
FontFamily="Consolas, monospace" FontSize="12"
|
|
FontFamily="Consolas, monospace" FontSize="12"
|
|
|
Foreground="{DynamicResource InfoBrush}"/>
|
|
Foreground="{DynamicResource InfoBrush}"/>
|
|
|
</Grid>
|
|
</Grid>
|
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
|
- <TextBlock Text="手自动" FontSize="11" Foreground="{DynamicResource TextTertiaryBrush}"/>
|
|
|
|
|
- <TextBlock Grid.Column="1" Text="{Binding SelectedPump.IsAutoMode, Converter={x:Static conv:BoolConverters.ToAutoModeText}}"
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding ManualAutoLabelText}" FontSize="11" Foreground="{DynamicResource TextTertiaryBrush}"/>
|
|
|
|
|
+ <TextBlock Grid.Column="1" Text="{Binding IsAutoMode, Converter={x:Static conv:BoolConverters.ToAutoModeText}}"
|
|
|
FontFamily="Consolas, monospace" FontSize="12"
|
|
FontFamily="Consolas, monospace" FontSize="12"
|
|
|
Foreground="{DynamicResource WarningBrush}"/>
|
|
Foreground="{DynamicResource WarningBrush}"/>
|
|
|
</Grid>
|
|
</Grid>
|
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
|
- <TextBlock Text="故障" FontSize="11" Foreground="{DynamicResource TextTertiaryBrush}"/>
|
|
|
|
|
- <TextBlock Grid.Column="1" Text="故障!" FontSize="12" FontWeight="Bold"
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding FaultLabelText}" FontSize="11" Foreground="{DynamicResource TextTertiaryBrush}"/>
|
|
|
|
|
+ <TextBlock Grid.Column="1" Text="{Binding FaultText}" FontSize="12" FontWeight="Bold"
|
|
|
Foreground="{DynamicResource DangerBrush}"
|
|
Foreground="{DynamicResource DangerBrush}"
|
|
|
- IsVisible="{Binding SelectedPump.HasFault}"/>
|
|
|
|
|
- <TextBlock Grid.Column="1" Text="正常" FontSize="12"
|
|
|
|
|
|
|
+ IsVisible="{Binding HasFault}"/>
|
|
|
|
|
+ <TextBlock Grid.Column="1" Text="{Binding NormalText}" FontSize="12"
|
|
|
Foreground="{DynamicResource TextSecondaryBrush}"
|
|
Foreground="{DynamicResource TextSecondaryBrush}"
|
|
|
- IsVisible="{Binding !SelectedPump.HasFault}"/>
|
|
|
|
|
|
|
+ IsVisible="{Binding !HasFault}"/>
|
|
|
</Grid>
|
|
</Grid>
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
</Border>
|
|
</Border>
|
|
@@ -182,39 +183,38 @@
|
|
|
<Grid ColumnDefinitions="*,*" Margin="0,4,0,0" ColumnSpacing="6">
|
|
<Grid ColumnDefinitions="*,*" Margin="0,4,0,0" ColumnSpacing="6">
|
|
|
<!-- 中控/屏控 状态指示 (只读,全局切换在标题栏) -->
|
|
<!-- 中控/屏控 状态指示 (只读,全局切换在标题栏) -->
|
|
|
<Border Grid.Column="0" CornerRadius="4" Padding="0,6"
|
|
<Border Grid.Column="0" CornerRadius="4" Padding="0,6"
|
|
|
- BorderBrush="{Binding SelectedPump.IsCentralMode, Converter={x:Static conv:BoolConverters.ToModeToggleBrush}}"
|
|
|
|
|
|
|
+ BorderBrush="{Binding IsCentralMode, Converter={x:Static conv:BoolConverters.ToModeToggleBrush}}"
|
|
|
BorderThickness="1"
|
|
BorderThickness="1"
|
|
|
- Background="{Binding SelectedPump.IsCentralMode, Converter={x:Static conv:BoolConverters.ToActiveBgBrush}}">
|
|
|
|
|
|
|
+ Background="{Binding IsCentralMode, Converter={x:Static conv:BoolConverters.ToActiveBgBrush}}">
|
|
|
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="11"
|
|
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="11"
|
|
|
- Text="{Binding SelectedPump.IsCentralMode, Converter={x:Static conv:BoolConverters.ToModeText}}"
|
|
|
|
|
- Foreground="{Binding SelectedPump.IsCentralMode, Converter={x:Static conv:BoolConverters.ToModeToggleBrush}}"/>
|
|
|
|
|
- </Border>
|
|
|
|
|
- <!-- 手动/自动 切换 (单控件,双向切换) -->
|
|
|
|
|
- <Border Grid.Column="1" CornerRadius="4" Padding="0,6"
|
|
|
|
|
- BorderBrush="{Binding SelectedPump.IsAutoMode, Converter={x:Static conv:BoolConverters.ToManualToggleBrush}}"
|
|
|
|
|
- BorderThickness="1"
|
|
|
|
|
- Background="{Binding SelectedPump.IsAutoMode, Converter={x:Static conv:BoolConverters.ToManualToggleBgBrush}}">
|
|
|
|
|
- <Button Content="{Binding SelectedPump.IsAutoMode, Converter={x:Static conv:BoolConverters.ToManualToggleText}}"
|
|
|
|
|
- Command="{Binding SelectedPump.ToggleManualModeCommand}"
|
|
|
|
|
- FontSize="11" Padding="0" Margin="0"
|
|
|
|
|
- Background="Transparent" BorderThickness="0"
|
|
|
|
|
- HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
|
|
|
|
- Foreground="{Binding SelectedPump.IsAutoMode, Converter={x:Static conv:BoolConverters.ToManualToggleBrush}}"/>
|
|
|
|
|
|
|
+ Text="{Binding IsCentralMode, Converter={x:Static conv:BoolConverters.ToModeText}}"
|
|
|
|
|
+ Foreground="{Binding IsCentralMode, Converter={x:Static conv:BoolConverters.ToModeToggleBrush}}"/>
|
|
|
</Border>
|
|
</Border>
|
|
|
|
|
+ <!-- 手动/自动 切换 -->
|
|
|
|
|
+ <Button Grid.Column="1"
|
|
|
|
|
+ Content="{Binding IsAutoMode, Converter={x:Static conv:BoolConverters.ToManualToggleText}}"
|
|
|
|
|
+ Command="{Binding ToggleManualModeCommand}"
|
|
|
|
|
+ FontSize="11" FontWeight="Bold"
|
|
|
|
|
+ FontFamily="Consolas, monospace"
|
|
|
|
|
+ Padding="0,6"
|
|
|
|
|
+ Background="{Binding IsAutoMode, Converter={x:Static conv:BoolConverters.ToManualToggleBgBrush}}"
|
|
|
|
|
+ BorderBrush="{Binding IsAutoMode, Converter={x:Static conv:BoolConverters.ToManualToggleBrush}}"
|
|
|
|
|
+ BorderThickness="1"
|
|
|
|
|
+ Foreground="{Binding IsAutoMode, Converter={x:Static conv:BoolConverters.ToManualToggleBrush}}"
|
|
|
|
|
+ HorizontalAlignment="Stretch"/>
|
|
|
</Grid>
|
|
</Grid>
|
|
|
|
|
|
|
|
- <!-- 启停切换 (单控件) -->
|
|
|
|
|
- <Border CornerRadius="5" Padding="0,8" Margin="0,4,0,0"
|
|
|
|
|
- BorderBrush="{Binding SelectedPump.IsRunning, Converter={x:Static conv:BoolConverters.ToPumpToggleBrush}}"
|
|
|
|
|
- BorderThickness="1"
|
|
|
|
|
- Background="{Binding SelectedPump.IsRunning, Converter={x:Static conv:BoolConverters.ToPumpToggleBgBrush}}">
|
|
|
|
|
- <Button Content="{Binding SelectedPump.IsRunning, Converter={x:Static conv:BoolConverters.ToPumpToggleText}}"
|
|
|
|
|
- Command="{Binding SelectedPump.TogglePumpCommand}"
|
|
|
|
|
- FontSize="13" Padding="0" Margin="0"
|
|
|
|
|
- Background="Transparent" BorderThickness="0"
|
|
|
|
|
- HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
|
|
|
|
- Foreground="{Binding SelectedPump.IsRunning, Converter={x:Static conv:BoolConverters.ToPumpToggleBrush}}"/>
|
|
|
|
|
- </Border>
|
|
|
|
|
|
|
+ <!-- 启停切换 (工业实心按钮) -->
|
|
|
|
|
+ <Button Content="{Binding IsRunning, Converter={x:Static conv:BoolConverters.ToPumpToggleText}}"
|
|
|
|
|
+ Command="{Binding TogglePumpCommand}"
|
|
|
|
|
+ FontSize="13" FontWeight="Bold"
|
|
|
|
|
+ FontFamily="Consolas, monospace"
|
|
|
|
|
+ Padding="0,8" Margin="0,4,0,0"
|
|
|
|
|
+ Background="{Binding IsRunning, Converter={x:Static conv:BoolConverters.ToPumpToggleBgBrush}}"
|
|
|
|
|
+ BorderBrush="{Binding IsRunning, Converter={x:Static conv:BoolConverters.ToPumpToggleBrush}}"
|
|
|
|
|
+ BorderThickness="1"
|
|
|
|
|
+ Foreground="White"
|
|
|
|
|
+ HorizontalAlignment="Stretch"/>
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
</Border>
|
|
</Border>
|
|
|
</Border>
|
|
</Border>
|
|
@@ -230,13 +230,13 @@
|
|
|
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto" Margin="2,0,2,8">
|
|
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto" Margin="2,0,2,8">
|
|
|
<StackPanel Orientation="Horizontal" Spacing="8" VerticalAlignment="Center">
|
|
<StackPanel Orientation="Horizontal" Spacing="8" VerticalAlignment="Center">
|
|
|
<Border Background="{DynamicResource SuccessBrush}" Width="3" Height="16" CornerRadius="1"/>
|
|
<Border Background="{DynamicResource SuccessBrush}" Width="3" Height="16" CornerRadius="1"/>
|
|
|
- <TextBlock Text="泵组控制" FontFamily="Consolas, monospace" FontSize="12"
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding PumpGroupControlText}" FontFamily="Consolas, monospace" FontSize="12"
|
|
|
FontWeight="Bold" Foreground="{DynamicResource TextSecondaryBrush}"/>
|
|
FontWeight="Bold" Foreground="{DynamicResource TextSecondaryBrush}"/>
|
|
|
<!-- 运行台数概览 -->
|
|
<!-- 运行台数概览 -->
|
|
|
<Border Background="{DynamicResource PanelBgBrush}" CornerRadius="8" Padding="8,2"
|
|
<Border Background="{DynamicResource PanelBgBrush}" CornerRadius="8" Padding="8,2"
|
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1">
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1">
|
|
|
<StackPanel Orientation="Horizontal" Spacing="5">
|
|
<StackPanel Orientation="Horizontal" Spacing="5">
|
|
|
- <TextBlock Text="运行" FontSize="10" Foreground="{DynamicResource TextTertiaryBrush}"/>
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding RunningCountText}" FontSize="10" Foreground="{DynamicResource TextTertiaryBrush}"/>
|
|
|
<TextBlock FontFamily="Consolas, monospace" FontSize="11" FontWeight="Bold"
|
|
<TextBlock FontFamily="Consolas, monospace" FontSize="11" FontWeight="Bold"
|
|
|
Foreground="{DynamicResource SuccessBrush}">
|
|
Foreground="{DynamicResource SuccessBrush}">
|
|
|
<TextBlock.Text>
|
|
<TextBlock.Text>
|
|
@@ -246,7 +246,7 @@
|
|
|
</MultiBinding>
|
|
</MultiBinding>
|
|
|
</TextBlock.Text>
|
|
</TextBlock.Text>
|
|
|
</TextBlock>
|
|
</TextBlock>
|
|
|
- <TextBlock Text="台" FontSize="10" Foreground="{DynamicResource TextTertiaryBrush}"/>
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding UnitTaiText}" FontSize="10" Foreground="{DynamicResource TextTertiaryBrush}"/>
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
</Border>
|
|
</Border>
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
@@ -255,28 +255,22 @@
|
|
|
<TextBlock Grid.Column="1" Margin="10,0" VerticalAlignment="Center"
|
|
<TextBlock Grid.Column="1" Margin="10,0" VerticalAlignment="Center"
|
|
|
IsVisible="{Binding HasSuggestedPump}"
|
|
IsVisible="{Binding HasSuggestedPump}"
|
|
|
FontFamily="Microsoft YaHei" FontSize="11"
|
|
FontFamily="Microsoft YaHei" FontSize="11"
|
|
|
- Foreground="{DynamicResource WarningBrush}">
|
|
|
|
|
- <TextBlock.Text>
|
|
|
|
|
- <MultiBinding StringFormat="建议启动 {0}(按编号顺序,优先启动)">
|
|
|
|
|
- <Binding Path="SuggestedPumpName"/>
|
|
|
|
|
- </MultiBinding>
|
|
|
|
|
- </TextBlock.Text>
|
|
|
|
|
- </TextBlock>
|
|
|
|
|
|
|
+ Foreground="{DynamicResource WarningBrush}"
|
|
|
|
|
+ Text="{Binding SuggestStartText}"/>
|
|
|
|
|
|
|
|
<StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="6" VerticalAlignment="Center">
|
|
<StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="6" VerticalAlignment="Center">
|
|
|
<!-- 全局中控/屏控切换 -->
|
|
<!-- 全局中控/屏控切换 -->
|
|
|
- <Border CornerRadius="4" Padding="6,2"
|
|
|
|
|
- BorderBrush="{Binding IsCentralControlMode, Converter={x:Static conv:BoolConverters.ToModeToggleBrush}}"
|
|
|
|
|
- BorderThickness="1"
|
|
|
|
|
- Background="{Binding IsCentralControlMode, Converter={x:Static conv:BoolConverters.ToActiveBgBrush}}">
|
|
|
|
|
- <Button Content="{Binding IsCentralControlMode, Converter={x:Static conv:BoolConverters.ToModeToggleText}}"
|
|
|
|
|
- Command="{Binding ToggleControlModeCommand}"
|
|
|
|
|
- FontSize="10" Padding="0" Margin="0"
|
|
|
|
|
- Background="Transparent" BorderThickness="0"
|
|
|
|
|
- Foreground="{Binding IsCentralControlMode, Converter={x:Static conv:BoolConverters.ToModeToggleBrush}}"/>
|
|
|
|
|
- </Border>
|
|
|
|
|
- <Button Content="日台时清零" Command="{Binding DailyResetAllCommand}"
|
|
|
|
|
- Padding="10,4" FontSize="10" Classes="btn-warning"/>
|
|
|
|
|
|
|
+ <Button Content="{Binding IsCentralControlMode, Converter={x:Static conv:BoolConverters.ToModeToggleText}}"
|
|
|
|
|
+ Command="{Binding ToggleControlModeCommand}"
|
|
|
|
|
+ FontSize="10" FontWeight="Bold"
|
|
|
|
|
+ FontFamily="Consolas, monospace"
|
|
|
|
|
+ Padding="8,3"
|
|
|
|
|
+ Background="{Binding IsCentralControlMode, Converter={x:Static conv:BoolConverters.ToActiveBgBrush}}"
|
|
|
|
|
+ BorderBrush="{Binding IsCentralControlMode, Converter={x:Static conv:BoolConverters.ToModeToggleBrush}}"
|
|
|
|
|
+ BorderThickness="1"
|
|
|
|
|
+ Foreground="{Binding IsCentralControlMode, Converter={x:Static conv:BoolConverters.ToModeToggleBrush}}"/>
|
|
|
|
|
+ <Button Content="{Binding DailyResetAllText}" Command="{Binding DailyResetAllCommand}"
|
|
|
|
|
+ Classes="btn-warning btn-compact"/>
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
</Grid>
|
|
</Grid>
|
|
|
|
|
|
|
@@ -302,10 +296,10 @@
|
|
|
Foreground="{DynamicResource TextPrimaryBrush}" VerticalAlignment="Center"/>
|
|
Foreground="{DynamicResource TextPrimaryBrush}" VerticalAlignment="Center"/>
|
|
|
<Border IsVisible="{Binding IsSuggested}" Background="#FFB300"
|
|
<Border IsVisible="{Binding IsSuggested}" Background="#FFB300"
|
|
|
CornerRadius="3" Padding="4,1">
|
|
CornerRadius="3" Padding="4,1">
|
|
|
- <TextBlock Text="建议" FontSize="9" FontWeight="Bold"
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding SuggestText}" FontSize="9" FontWeight="Bold"
|
|
|
Foreground="#1B1F27" VerticalAlignment="Center"/>
|
|
Foreground="#1B1F27" VerticalAlignment="Center"/>
|
|
|
</Border>
|
|
</Border>
|
|
|
- <TextBlock Text="故障!" FontSize="10" FontWeight="Bold"
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding FaultText}" FontSize="10" FontWeight="Bold"
|
|
|
Foreground="{DynamicResource DangerBrush}" VerticalAlignment="Center"
|
|
Foreground="{DynamicResource DangerBrush}" VerticalAlignment="Center"
|
|
|
IsVisible="{Binding HasFault}"/>
|
|
IsVisible="{Binding HasFault}"/>
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
@@ -317,7 +311,7 @@
|
|
|
<!-- 中:电流(带负荷条) / 日台时 -->
|
|
<!-- 中:电流(带负荷条) / 日台时 -->
|
|
|
<StackPanel Grid.Column="1" Margin="12,0" Spacing="3" VerticalAlignment="Center">
|
|
<StackPanel Grid.Column="1" Margin="12,0" Spacing="3" VerticalAlignment="Center">
|
|
|
<Grid ColumnDefinitions="*,Auto" ColumnSpacing="6">
|
|
<Grid ColumnDefinitions="*,Auto" ColumnSpacing="6">
|
|
|
- <TextBlock Text="电流" FontSize="9" Foreground="{DynamicResource TextTertiaryBrush}" VerticalAlignment="Center"/>
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding CurrentLabelText}" FontSize="9" Foreground="{DynamicResource TextTertiaryBrush}" VerticalAlignment="Center"/>
|
|
|
<TextBlock Grid.Column="1" Text="{Binding Current, StringFormat='{}{0:F1} A'}"
|
|
<TextBlock Grid.Column="1" Text="{Binding Current, StringFormat='{}{0:F1} A'}"
|
|
|
FontFamily="Consolas, monospace" FontSize="12" FontWeight="Bold"
|
|
FontFamily="Consolas, monospace" FontSize="12" FontWeight="Bold"
|
|
|
Foreground="{Binding IsOverload, Converter={x:Static conv:BoolConverters.ToOverloadBrush}}"/>
|
|
Foreground="{Binding IsOverload, Converter={x:Static conv:BoolConverters.ToOverloadBrush}}"/>
|
|
@@ -329,12 +323,12 @@
|
|
|
Value="{Binding CurrentLoadRatio}"
|
|
Value="{Binding CurrentLoadRatio}"
|
|
|
Background="#2AFFFFFF"
|
|
Background="#2AFFFFFF"
|
|
|
Foreground="{Binding IsOverload, Converter={x:Static conv:BoolConverters.ToOverloadBrush}}"/>
|
|
Foreground="{Binding IsOverload, Converter={x:Static conv:BoolConverters.ToOverloadBrush}}"/>
|
|
|
- <TextBlock Grid.Column="1" Text="超载" FontSize="8" FontWeight="Bold"
|
|
|
|
|
|
|
+ <TextBlock Grid.Column="1" Text="{Binding OverloadText}" FontSize="8" FontWeight="Bold"
|
|
|
Foreground="{DynamicResource DangerBrush}" VerticalAlignment="Center"
|
|
Foreground="{DynamicResource DangerBrush}" VerticalAlignment="Center"
|
|
|
IsVisible="{Binding IsOverload}"/>
|
|
IsVisible="{Binding IsOverload}"/>
|
|
|
</Grid>
|
|
</Grid>
|
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
|
- <TextBlock Text="日台时" FontSize="9" Foreground="{DynamicResource TextTertiaryBrush}" VerticalAlignment="Center"/>
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding DailyHoursLabelText}" FontSize="9" Foreground="{DynamicResource TextTertiaryBrush}" VerticalAlignment="Center"/>
|
|
|
<TextBlock Grid.Column="1" FontFamily="Consolas, monospace" FontSize="11"
|
|
<TextBlock Grid.Column="1" FontFamily="Consolas, monospace" FontSize="11"
|
|
|
Foreground="{DynamicResource TextSecondaryBrush}">
|
|
Foreground="{DynamicResource TextSecondaryBrush}">
|
|
|
<TextBlock.Text>
|
|
<TextBlock.Text>
|
|
@@ -349,28 +343,28 @@
|
|
|
|
|
|
|
|
<!-- 右:模式切换 + 启停按钮 -->
|
|
<!-- 右:模式切换 + 启停按钮 -->
|
|
|
<StackPanel Grid.Column="2" Orientation="Vertical" Spacing="4" VerticalAlignment="Center">
|
|
<StackPanel Grid.Column="2" Orientation="Vertical" Spacing="4" VerticalAlignment="Center">
|
|
|
- <!-- 第一行:手动/自动 切换(单控件,中控/屏控已移至全局标题栏) -->
|
|
|
|
|
- <Border CornerRadius="4" Padding="6,2"
|
|
|
|
|
- BorderBrush="{Binding IsAutoMode, Converter={x:Static conv:BoolConverters.ToManualToggleBrush}}"
|
|
|
|
|
- BorderThickness="1"
|
|
|
|
|
- Background="{Binding IsAutoMode, Converter={x:Static conv:BoolConverters.ToManualToggleBgBrush}}">
|
|
|
|
|
- <Button Content="{Binding IsAutoMode, Converter={x:Static conv:BoolConverters.ToManualToggleText}}"
|
|
|
|
|
- Command="{Binding ToggleManualModeCommand}"
|
|
|
|
|
- FontSize="9" Padding="0" Margin="0"
|
|
|
|
|
- Background="Transparent" BorderThickness="0"
|
|
|
|
|
- Foreground="{Binding IsAutoMode, Converter={x:Static conv:BoolConverters.ToManualToggleBrush}}"/>
|
|
|
|
|
- </Border>
|
|
|
|
|
- <!-- 第二行:启停切换 (单控件,IsEnabled 由 CanExecute 驱动) -->
|
|
|
|
|
- <Border CornerRadius="4" Padding="9,4"
|
|
|
|
|
- BorderBrush="{Binding IsRunning, Converter={x:Static conv:BoolConverters.ToPumpToggleBrush}}"
|
|
|
|
|
- BorderThickness="1"
|
|
|
|
|
- Background="{Binding IsRunning, Converter={x:Static conv:BoolConverters.ToPumpToggleBgBrush}}">
|
|
|
|
|
- <Button Content="{Binding IsRunning, Converter={x:Static conv:BoolConverters.ToPumpToggleText}}"
|
|
|
|
|
- Command="{Binding TogglePumpCommand}"
|
|
|
|
|
- FontSize="10" Padding="0" Margin="0"
|
|
|
|
|
- Background="Transparent" BorderThickness="0"
|
|
|
|
|
- Foreground="{Binding IsRunning, Converter={x:Static conv:BoolConverters.ToPumpToggleBrush}}"/>
|
|
|
|
|
- </Border>
|
|
|
|
|
|
|
+ <!-- 第一行:手动/自动 切换 -->
|
|
|
|
|
+ <Button Content="{Binding IsAutoMode, Converter={x:Static conv:BoolConverters.ToManualToggleText}}"
|
|
|
|
|
+ Command="{Binding ToggleManualModeCommand}"
|
|
|
|
|
+ FontSize="9" FontWeight="Bold"
|
|
|
|
|
+ FontFamily="Consolas, monospace"
|
|
|
|
|
+ Padding="8,3"
|
|
|
|
|
+ Background="{Binding IsAutoMode, Converter={x:Static conv:BoolConverters.ToManualToggleBgBrush}}"
|
|
|
|
|
+ BorderBrush="{Binding IsAutoMode, Converter={x:Static conv:BoolConverters.ToManualToggleBrush}}"
|
|
|
|
|
+ BorderThickness="1"
|
|
|
|
|
+ Foreground="{Binding IsAutoMode, Converter={x:Static conv:BoolConverters.ToManualToggleBrush}}"
|
|
|
|
|
+ HorizontalAlignment="Stretch"/>
|
|
|
|
|
+ <!-- 第二行:启停切换 (工业实心按钮) -->
|
|
|
|
|
+ <Button Content="{Binding IsRunning, Converter={x:Static conv:BoolConverters.ToPumpToggleText}}"
|
|
|
|
|
+ Command="{Binding TogglePumpCommand}"
|
|
|
|
|
+ FontSize="10" FontWeight="Bold"
|
|
|
|
|
+ FontFamily="Consolas, monospace"
|
|
|
|
|
+ Padding="12,5"
|
|
|
|
|
+ Background="{Binding IsRunning, Converter={x:Static conv:BoolConverters.ToPumpToggleBgBrush}}"
|
|
|
|
|
+ BorderBrush="{Binding IsRunning, Converter={x:Static conv:BoolConverters.ToPumpToggleBrush}}"
|
|
|
|
|
+ BorderThickness="1"
|
|
|
|
|
+ Foreground="White"
|
|
|
|
|
+ HorizontalAlignment="Stretch"/>
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
</Grid>
|
|
</Grid>
|
|
|
</Border>
|
|
</Border>
|
|
@@ -390,7 +384,7 @@
|
|
|
<StackPanel>
|
|
<StackPanel>
|
|
|
<StackPanel Orientation="Horizontal" Spacing="6" Margin="0,0,0,8">
|
|
<StackPanel Orientation="Horizontal" Spacing="6" Margin="0,0,0,8">
|
|
|
<Border Background="{DynamicResource InfoBrush}" Width="3" Height="14" CornerRadius="1"/>
|
|
<Border Background="{DynamicResource InfoBrush}" Width="3" Height="14" CornerRadius="1"/>
|
|
|
- <TextBlock Text="液位监控" FontFamily="Consolas, monospace" FontSize="11" Foreground="{DynamicResource TextSecondaryBrush}"/>
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding TankMonitorText}" FontFamily="Consolas, monospace" FontSize="11" Foreground="{DynamicResource TextSecondaryBrush}"/>
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
<ItemsControl ItemsSource="{Binding Tanks}">
|
|
<ItemsControl ItemsSource="{Binding Tanks}">
|
|
|
<ItemsControl.ItemTemplate>
|
|
<ItemsControl.ItemTemplate>
|
|
@@ -406,7 +400,7 @@
|
|
|
<TextBlock Text="{Binding Name}" FontSize="12" FontWeight="Bold"
|
|
<TextBlock Text="{Binding Name}" FontSize="12" FontWeight="Bold"
|
|
|
Foreground="{DynamicResource TextPrimaryBrush}" VerticalAlignment="Center"/>
|
|
Foreground="{DynamicResource TextPrimaryBrush}" VerticalAlignment="Center"/>
|
|
|
<!-- 液位工况档位徽章 -->
|
|
<!-- 液位工况档位徽章 -->
|
|
|
- <Border HorizontalAlignment="Left" Margin="8,0"
|
|
|
|
|
|
|
+ <Border Grid.Column="1" HorizontalAlignment="Left" Margin="8,0"
|
|
|
CornerRadius="3" Padding="6,2"
|
|
CornerRadius="3" Padding="6,2"
|
|
|
Background="{Binding CurrentStage, Converter={x:Static conv:TankStageConverters.ToBrush}}">
|
|
Background="{Binding CurrentStage, Converter={x:Static conv:TankStageConverters.ToBrush}}">
|
|
|
<TextBlock Text="{Binding CurrentStage, Converter={x:Static conv:TankStageConverters.ToText}}"
|
|
<TextBlock Text="{Binding CurrentStage, Converter={x:Static conv:TankStageConverters.ToText}}"
|
|
@@ -426,31 +420,35 @@
|
|
|
LineBrush="{DynamicResource SuccessBrush}"
|
|
LineBrush="{DynamicResource SuccessBrush}"
|
|
|
FillBrush="{StaticResource LocalSparkFillBrush}"/>
|
|
FillBrush="{StaticResource LocalSparkFillBrush}"/>
|
|
|
</Border>
|
|
</Border>
|
|
|
- <!-- 可编辑阈值(动态数量,跟随项目泵数)+ 同步按钮 -->
|
|
|
|
|
- <ItemsControl ItemsSource="{Binding ThresholdRows}">
|
|
|
|
|
|
|
+ <!-- 可编辑阈值(动态数量,跟随项目泵数 + 压力)+ 同步按钮 -->
|
|
|
|
|
+ <ItemsControl ItemsSource="{Binding ThresholdRows}" Grid.IsSharedSizeScope="True">
|
|
|
<ItemsControl.ItemTemplate>
|
|
<ItemsControl.ItemTemplate>
|
|
|
<DataTemplate>
|
|
<DataTemplate>
|
|
|
- <Grid ColumnDefinitions="*,60,Auto" Margin="0,2"
|
|
|
|
|
- IsVisible="{Binding IsVisible}">
|
|
|
|
|
|
|
+ <Grid Margin="0,2" IsVisible="{Binding IsVisible}">
|
|
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
|
|
+ <ColumnDefinition Width="Auto" SharedSizeGroup="label"/>
|
|
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
|
|
+ <ColumnDefinition Width="Auto" SharedSizeGroup="unit"/>
|
|
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
<TextBlock Text="{Binding Label}" FontSize="10"
|
|
<TextBlock Text="{Binding Label}" FontSize="10"
|
|
|
Foreground="{DynamicResource TextTertiaryBrush}" VerticalAlignment="Center"/>
|
|
Foreground="{DynamicResource TextTertiaryBrush}" VerticalAlignment="Center"/>
|
|
|
<TextBox Grid.Column="1" Text="{Binding EditValue, StringFormat='{}{0:F2}'}"
|
|
<TextBox Grid.Column="1" Text="{Binding EditValue, StringFormat='{}{0:F2}'}"
|
|
|
- IsEnabled="{Binding IsEditable}"
|
|
|
|
|
|
|
+ IsEnabled="{Binding IsEditable}" Width="65"
|
|
|
|
|
+ HorizontalAlignment="Right"
|
|
|
FontFamily="Consolas, monospace" FontSize="11" Padding="4,2" Height="22"
|
|
FontFamily="Consolas, monospace" FontSize="11" Padding="4,2" Height="22"
|
|
|
Foreground="{DynamicResource TextSecondaryBrush}" Background="{DynamicResource PanelBgBrush}"/>
|
|
Foreground="{DynamicResource TextSecondaryBrush}" Background="{DynamicResource PanelBgBrush}"/>
|
|
|
- <TextBlock Grid.Column="2" Text="m" FontSize="9"
|
|
|
|
|
|
|
+ <TextBlock Grid.Column="2" Text="{Binding Unit}" FontSize="9"
|
|
|
Foreground="{DynamicResource TextTertiaryBrush}" Margin="4,0,0,0" VerticalAlignment="Center"/>
|
|
Foreground="{DynamicResource TextTertiaryBrush}" Margin="4,0,0,0" VerticalAlignment="Center"/>
|
|
|
</Grid>
|
|
</Grid>
|
|
|
</DataTemplate>
|
|
</DataTemplate>
|
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
|
</ItemsControl>
|
|
</ItemsControl>
|
|
|
<!-- 同步到 PLC 按钮 -->
|
|
<!-- 同步到 PLC 按钮 -->
|
|
|
- <Button Content="同步到PLC" Command="{Binding SyncThresholdsToPlcCommand}"
|
|
|
|
|
|
|
+ <Button Content="{Binding SyncToPlcText}" Command="{Binding SyncThresholdsToPlcCommand}"
|
|
|
IsVisible="{Binding HasWritableAddresses}"
|
|
IsVisible="{Binding HasWritableAddresses}"
|
|
|
IsEnabled="{Binding !IsSyncing}"
|
|
IsEnabled="{Binding !IsSyncing}"
|
|
|
HorizontalAlignment="Right" Margin="0,6,0,0"
|
|
HorizontalAlignment="Right" Margin="0,6,0,0"
|
|
|
- FontSize="10" Padding="10,4" Height="24"
|
|
|
|
|
- Background="{DynamicResource InfoBrush}" Foreground="White"/>
|
|
|
|
|
|
|
+ Classes="btn-primary btn-compact"/>
|
|
|
<TextBlock Text="{Binding SyncStatusText}" FontSize="9"
|
|
<TextBlock Text="{Binding SyncStatusText}" FontSize="9"
|
|
|
Foreground="{DynamicResource TextTertiaryBrush}" Margin="0,3,0,0"
|
|
Foreground="{DynamicResource TextTertiaryBrush}" Margin="0,3,0,0"
|
|
|
TextTrimming="CharacterEllipsis" IsVisible="{Binding SyncStatusText, Converter={x:Static conv:BoolConverters.IsNotEmpty}}"/>
|
|
TextTrimming="CharacterEllipsis" IsVisible="{Binding SyncStatusText, Converter={x:Static conv:BoolConverters.IsNotEmpty}}"/>
|
|
@@ -468,7 +466,7 @@
|
|
|
<StackPanel>
|
|
<StackPanel>
|
|
|
<StackPanel Orientation="Horizontal" Spacing="6" Margin="0,0,0,8">
|
|
<StackPanel Orientation="Horizontal" Spacing="6" Margin="0,0,0,8">
|
|
|
<Border Background="{DynamicResource WarningBrush}" Width="3" Height="14" CornerRadius="1"/>
|
|
<Border Background="{DynamicResource WarningBrush}" Width="3" Height="14" CornerRadius="1"/>
|
|
|
- <TextBlock Text="仪表监控" FontFamily="Consolas, monospace" FontSize="11" Foreground="{DynamicResource TextSecondaryBrush}"/>
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding GaugeMonitorText}" FontFamily="Consolas, monospace" FontSize="11" Foreground="{DynamicResource TextSecondaryBrush}"/>
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
<ItemsControl ItemsSource="{Binding Gauges}">
|
|
<ItemsControl ItemsSource="{Binding Gauges}">
|
|
|
<ItemsControl.ItemTemplate>
|
|
<ItemsControl.ItemTemplate>
|
|
@@ -480,30 +478,6 @@
|
|
|
Value="{Binding Value}" Title="{Binding Name}" Unit="{Binding Unit}"
|
|
Value="{Binding Value}" Title="{Binding Name}" Unit="{Binding Unit}"
|
|
|
MinValue="{Binding MinValue}" MaxValue="{Binding MaxValue}"
|
|
MinValue="{Binding MinValue}" MaxValue="{Binding MaxValue}"
|
|
|
ValueColor="{DynamicResource SuccessBrush}"/>
|
|
ValueColor="{DynamicResource SuccessBrush}"/>
|
|
|
- <!-- 可编辑阈值 -->
|
|
|
|
|
- <Grid ColumnDefinitions="*,50,Auto" Margin="0,2" IsVisible="{Binding HasWritableAddresses}">
|
|
|
|
|
- <TextBlock Text="高压" FontSize="9" Foreground="{DynamicResource TextTertiaryBrush}" VerticalAlignment="Center"/>
|
|
|
|
|
- <TextBox Grid.Column="1" Text="{Binding EditHighAlarmSet, StringFormat='{}{0:F2}'}"
|
|
|
|
|
- FontFamily="Consolas, monospace" FontSize="10" Padding="3,1" Height="20"
|
|
|
|
|
- Foreground="{DynamicResource DangerBrush}" Background="{DynamicResource PanelBgBrush}"/>
|
|
|
|
|
- <TextBlock Grid.Column="2" Text="{Binding Unit}" FontSize="8" Foreground="{DynamicResource TextTertiaryBrush}" Margin="3,0,0,0" VerticalAlignment="Center"/>
|
|
|
|
|
- </Grid>
|
|
|
|
|
- <Grid ColumnDefinitions="*,50,Auto" Margin="0,2" IsVisible="{Binding HasWritableAddresses}">
|
|
|
|
|
- <TextBlock Text="低压" FontSize="9" Foreground="{DynamicResource TextTertiaryBrush}" VerticalAlignment="Center"/>
|
|
|
|
|
- <TextBox Grid.Column="1" Text="{Binding EditLowAlarmSet, StringFormat='{}{0:F2}'}"
|
|
|
|
|
- FontFamily="Consolas, monospace" FontSize="10" Padding="3,1" Height="20"
|
|
|
|
|
- Foreground="{DynamicResource WarningBrush}" Background="{DynamicResource PanelBgBrush}"/>
|
|
|
|
|
- <TextBlock Grid.Column="2" Text="{Binding Unit}" FontSize="8" Foreground="{DynamicResource TextTertiaryBrush}" Margin="3,0,0,0" VerticalAlignment="Center"/>
|
|
|
|
|
- </Grid>
|
|
|
|
|
- <Button Content="同步" Command="{Binding SyncThresholdsToPlcCommand}"
|
|
|
|
|
- IsVisible="{Binding HasWritableAddresses}"
|
|
|
|
|
- IsEnabled="{Binding !IsSyncing}"
|
|
|
|
|
- HorizontalAlignment="Right" Margin="0,4,0,0"
|
|
|
|
|
- FontSize="9" Padding="8,3" Height="20"
|
|
|
|
|
- Background="{DynamicResource InfoBrush}" Foreground="White"/>
|
|
|
|
|
- <TextBlock Text="{Binding SyncStatusText}" FontSize="8"
|
|
|
|
|
- Foreground="{DynamicResource TextTertiaryBrush}" Margin="0,2,0,0"
|
|
|
|
|
- TextTrimming="CharacterEllipsis" IsVisible="{Binding SyncStatusText, Converter={x:Static conv:BoolConverters.IsNotEmpty}}"/>
|
|
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
</Border>
|
|
</Border>
|
|
|
</DataTemplate>
|
|
</DataTemplate>
|
|
@@ -523,7 +497,7 @@
|
|
|
<StackPanel>
|
|
<StackPanel>
|
|
|
<StackPanel Orientation="Horizontal" Spacing="6" Margin="0,0,0,8">
|
|
<StackPanel Orientation="Horizontal" Spacing="6" Margin="0,0,0,8">
|
|
|
<Border Background="{DynamicResource InfoBrush}" Width="3" Height="14" CornerRadius="1"/>
|
|
<Border Background="{DynamicResource InfoBrush}" Width="3" Height="14" CornerRadius="1"/>
|
|
|
- <TextBlock Text="累计数据" FontFamily="Consolas, monospace" FontSize="11" Foreground="{DynamicResource TextSecondaryBrush}"/>
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding CumulativeDataText}" FontFamily="Consolas, monospace" FontSize="11" Foreground="{DynamicResource TextSecondaryBrush}"/>
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
<ItemsControl ItemsSource="{Binding Sensors}">
|
|
<ItemsControl ItemsSource="{Binding Sensors}">
|
|
|
<ItemsControl.ItemTemplate>
|
|
<ItemsControl.ItemTemplate>
|
|
@@ -547,24 +521,24 @@
|
|
|
<StackPanel>
|
|
<StackPanel>
|
|
|
<StackPanel Orientation="Horizontal" Spacing="6" Margin="0,0,0,8">
|
|
<StackPanel Orientation="Horizontal" Spacing="6" Margin="0,0,0,8">
|
|
|
<Border Background="{DynamicResource DangerBrush}" Width="3" Height="14" CornerRadius="1"/>
|
|
<Border Background="{DynamicResource DangerBrush}" Width="3" Height="14" CornerRadius="1"/>
|
|
|
- <TextBlock Text="故障状态" FontFamily="Consolas, monospace" FontSize="11" Foreground="{DynamicResource DangerBrush}"/>
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding FaultStatusText}" FontFamily="Consolas, monospace" FontSize="11" Foreground="{DynamicResource DangerBrush}"/>
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<!-- 最近报警(实时,最多 6 条,新报警置顶) -->
|
|
<!-- 最近报警(实时,最多 6 条,新报警置顶) -->
|
|
|
<Border Background="{DynamicResource PanelBgBrush}" CornerRadius="4" Padding="8,6" Margin="0,0,0,8">
|
|
<Border Background="{DynamicResource PanelBgBrush}" CornerRadius="4" Padding="8,6" Margin="0,0,0,8">
|
|
|
<StackPanel>
|
|
<StackPanel>
|
|
|
<Grid ColumnDefinitions="*,Auto,Auto" Margin="0,0,0,4">
|
|
<Grid ColumnDefinitions="*,Auto,Auto" Margin="0,0,0,4">
|
|
|
- <TextBlock Text="最近报警" FontFamily="Consolas, monospace" FontSize="10" FontWeight="Bold"
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding RecentAlarmsTitleText}" FontFamily="Consolas, monospace" FontSize="10" FontWeight="Bold"
|
|
|
Foreground="{DynamicResource DangerBrush}"/>
|
|
Foreground="{DynamicResource DangerBrush}"/>
|
|
|
- <Button Grid.Column="1" Content="复位" Command="{Binding ResetAllAlarmsCommand}"
|
|
|
|
|
|
|
+ <Button Grid.Column="1" Content="{Binding ResetAlarmText}" Command="{Binding ResetAllAlarmsCommand}"
|
|
|
FontSize="9" Padding="6,2" Height="18" Margin="0,0,4,0"
|
|
FontSize="9" Padding="6,2" Height="18" Margin="0,0,4,0"
|
|
|
IsVisible="{Binding HasActiveAlarm}"
|
|
IsVisible="{Binding HasActiveAlarm}"
|
|
|
- Background="{DynamicResource WarningBrush}" Foreground="White"/>
|
|
|
|
|
|
|
+ Classes="btn-warning btn-compact"/>
|
|
|
<TextBlock Grid.Column="2" Text="{Binding RecentAlarms.Count}"
|
|
<TextBlock Grid.Column="2" Text="{Binding RecentAlarms.Count}"
|
|
|
FontFamily="Consolas,monospace" FontSize="10"
|
|
FontFamily="Consolas,monospace" FontSize="10"
|
|
|
Foreground="{DynamicResource TextDisabledBrush}"/>
|
|
Foreground="{DynamicResource TextDisabledBrush}"/>
|
|
|
</Grid>
|
|
</Grid>
|
|
|
- <TextBlock Text="暂无报警" FontSize="10" Margin="0,2"
|
|
|
|
|
|
|
+ <TextBlock Text="{Binding NoAlarmsText}" FontSize="10" Margin="0,2"
|
|
|
Foreground="{DynamicResource TextDisabledBrush}"
|
|
Foreground="{DynamicResource TextDisabledBrush}"
|
|
|
IsVisible="{Binding RecentAlarms.Count, Converter={x:Static conv:BoolConverters.ToIsEmpty}}"/>
|
|
IsVisible="{Binding RecentAlarms.Count, Converter={x:Static conv:BoolConverters.ToIsEmpty}}"/>
|
|
|
<ItemsControl ItemsSource="{Binding RecentAlarms}"
|
|
<ItemsControl ItemsSource="{Binding RecentAlarms}"
|
|
@@ -638,9 +612,9 @@
|
|
|
<TextBlock Text="{Binding Address}" FontSize="9" FontFamily="Consolas, monospace"
|
|
<TextBlock Text="{Binding Address}" FontSize="9" FontFamily="Consolas, monospace"
|
|
|
Foreground="{DynamicResource TextDisabledBrush}"/>
|
|
Foreground="{DynamicResource TextDisabledBrush}"/>
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
- <Button Grid.Column="1" Content="执行" Command="{Binding PulseCommand}"
|
|
|
|
|
|
|
+ <Button Grid.Column="1" Content="{Binding ExecuteText}" Command="{Binding PulseCommand}"
|
|
|
IsEnabled="{Binding !IsPulsing}" VerticalAlignment="Center"
|
|
IsEnabled="{Binding !IsPulsing}" VerticalAlignment="Center"
|
|
|
- Padding="8,2" FontSize="9" Classes="btn-warning"/>
|
|
|
|
|
|
|
+ Classes="btn-warning btn-compact"/>
|
|
|
</Grid>
|
|
</Grid>
|
|
|
</DataTemplate>
|
|
</DataTemplate>
|
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl.ItemTemplate>
|