feat: redesign Bench page with Fluent card layout and radial advance monitor
Three-column layout replacing the old HMI grid: - BenchRpmCommandCard: inline numeric input, 2×4 preset grid, Start/Stop - BenchActuatorsCard: direction toggle, oil pump, temperature PID, misc relays with FluentStateToggle showing checked state via AccentFillColor - BenchLiveDataCard: 2×5 KPI tiles (RPM, P1, P2, Q-Delivery, Q-Over, temps) - BenchChartsCard: 2×2 compact chart grid (Delivery, Over, P1, P2) - AdvanceMonitorCard: RadialAngleGauge custom FrameworkElement + PSG/INJ readouts, Δ° lock offset input, Zero PSG / Zero INJ buttons Supporting changes: - AngleDisplayViewModel: promote _currentManualDegrees, _isLockSet to [ObservableProperty]; add PsgRelativeDegrees, InjEncoderDegreesValue, TargetLockAngle, IsRunningMode (29/31 hysteresis); computed PrimaryGaugeAngle, TargetAngleForGauge, SecondaryGaugeAngle - BenchControlViewModel: add IsDirectionLeft computed property, SetDirectionRightCommand, SetDirectionLeftCommand, ApplyRpmCommand - FlowmeterChartView: add IsCompact DP (false default) for 90px compact height - Styles.xaml: add IsChecked trigger to FluentStateToggle (accent fill + white text) - Strings.en/es.xaml: add all new card and actuator string keys Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
93
Views/UserControls/BenchChartsCard.xaml
Normal file
93
Views/UserControls/BenchChartsCard.xaml
Normal file
@@ -0,0 +1,93 @@
|
||||
<UserControl x:Class="HC_APTBS.Views.UserControls.BenchChartsCard"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
xmlns:uc="clr-namespace:HC_APTBS.Views.UserControls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="380" d:DesignWidth="560">
|
||||
<!--
|
||||
Live Charts card — 2×2 grid of compact chart tiles.
|
||||
Order: TL = Delivery, TR = Over, BL = P1, BR = P2.
|
||||
DataContext = BenchPageViewModel.
|
||||
-->
|
||||
<Border Style="{StaticResource PumpCard}">
|
||||
<DockPanel LastChildFill="True">
|
||||
|
||||
<!-- ── Card header ─────────────────────────────────────────── -->
|
||||
<DockPanel DockPanel.Dock="Top" Margin="0,0,0,10">
|
||||
<ui:SymbolIcon DockPanel.Dock="Left" Symbol="ChartMultiple24" FontSize="16"
|
||||
Foreground="{DynamicResource AccentTextFillColorPrimaryBrush}"
|
||||
Margin="0,0,8,0" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{DynamicResource Bench.Charts.Title}"
|
||||
Style="{StaticResource PumpCardHeader}" Margin="0"/>
|
||||
</DockPanel>
|
||||
|
||||
<!-- ── 2×2 chart grid ──────────────────────────────────────── -->
|
||||
<UniformGrid Rows="2" Columns="2">
|
||||
|
||||
<!-- TL: Q Delivery -->
|
||||
<Border Background="{DynamicResource ControlFillColorSecondaryBrush}"
|
||||
BorderBrush="{DynamicResource ControlStrokeColorDefaultBrush}"
|
||||
BorderThickness="1" CornerRadius="6" Margin="0,0,4,4" Padding="8,6">
|
||||
<DockPanel>
|
||||
<TextBlock DockPanel.Dock="Top"
|
||||
Text="{DynamicResource Bench.Chart.Delivery}"
|
||||
FontSize="11" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
||||
Margin="0,0,0,4"/>
|
||||
<uc:FlowmeterChartView IsCompact="True"
|
||||
DataContext="{Binding FlowmeterChart.Delivery}"/>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<!-- TR: Q Over -->
|
||||
<Border Background="{DynamicResource ControlFillColorSecondaryBrush}"
|
||||
BorderBrush="{DynamicResource ControlStrokeColorDefaultBrush}"
|
||||
BorderThickness="1" CornerRadius="6" Margin="4,0,0,4" Padding="8,6">
|
||||
<DockPanel>
|
||||
<TextBlock DockPanel.Dock="Top"
|
||||
Text="{DynamicResource Bench.Chart.Over}"
|
||||
FontSize="11" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
||||
Margin="0,0,0,4"/>
|
||||
<uc:FlowmeterChartView IsCompact="True"
|
||||
DataContext="{Binding FlowmeterChart.Over}"/>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<!-- BL: Pressure P1 -->
|
||||
<Border Background="{DynamicResource ControlFillColorSecondaryBrush}"
|
||||
BorderBrush="{DynamicResource ControlStrokeColorDefaultBrush}"
|
||||
BorderThickness="1" CornerRadius="6" Margin="0,4,4,0" Padding="8,6">
|
||||
<DockPanel>
|
||||
<TextBlock DockPanel.Dock="Top"
|
||||
Text="{DynamicResource Bench.Chart.P1}"
|
||||
FontSize="11" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
||||
Margin="0,0,0,4"/>
|
||||
<uc:FlowmeterChartView IsCompact="True"
|
||||
DataContext="{Binding PressureTrace.P1}"/>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<!-- BR: Pressure P2 -->
|
||||
<Border Background="{DynamicResource ControlFillColorSecondaryBrush}"
|
||||
BorderBrush="{DynamicResource ControlStrokeColorDefaultBrush}"
|
||||
BorderThickness="1" CornerRadius="6" Margin="4,4,0,0" Padding="8,6">
|
||||
<DockPanel>
|
||||
<TextBlock DockPanel.Dock="Top"
|
||||
Text="{DynamicResource Bench.Chart.P2}"
|
||||
FontSize="11" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
||||
Margin="0,0,0,4"/>
|
||||
<uc:FlowmeterChartView IsCompact="True"
|
||||
DataContext="{Binding PressureTrace.P2}"/>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
</UniformGrid>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user