Replace the monolithic MainWindow with a SelectedPage-driven shell (Dashboard / Pump / Bench / Tests / Results / Settings). The Tests page gets the Plan -> Preconditions -> Running -> Done wizard from ui-structure.md \u00a74, backed by a 7-item precondition gate and shared sub-views (PhaseCardView / TestSectionView / GraphicIndicatorView) extracted from the now-deleted monolithic TestPanelView. New VMs / views: - Tests wizard: TestPreconditions, PhaseCard, GraphicIndicator, TestSection, TestPlan, TestRunning, TestDone - Dashboard panels: DashboardConnection, DashboardReadings, DashboardAlarms, InterlockBanner, ResultHistory - Pump / bench panels: PumpIdentificationPanel, PumpLiveData, UnlockPanel, BenchDriveControl, BenchReadings, RelayBank, TemperatureControl, DtcList, AuthGate - Dialogs: generic ConfirmDialog, UserManageDialog, UserPromptDialog Supporting changes: - IsOilPumpOn exposed on MainViewModel for precondition evaluation - RequiresAuth added to TestDefinition (XML round-trip) - BipStatusDefinition + CompletedTestRun models - ~35 new Test.* localization keys (en + es) - Settings moved from modal dialog to full page - Pause / Retry / Skip stubs in TestRunningView; full spec in docs/gap-test-running-controls.md for follow-up implementation - docs/ui-structure.md captures the wizard design Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
141 lines
9.1 KiB
XML
141 lines
9.1 KiB
XML
<UserControl x:Class="HC_APTBS.Views.UserControls.BenchReadingsView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="300" d:DesignWidth="380">
|
|
<!--
|
|
HMI-style bench readings panel used on the Bench page.
|
|
Larger than the Dashboard variant; includes QDelivery + QOver and
|
|
shows the live voltage/target RPM summary.
|
|
DataContext = BenchPageViewModel. Reads via Root.X / BenchControl.X.
|
|
-->
|
|
<StackPanel>
|
|
|
|
<!-- RPM — oversized, with target + voltage summary -->
|
|
<Border Style="{StaticResource LcdBlue}" Margin="0,0,0,4" Padding="10,6">
|
|
<StackPanel>
|
|
<Grid Height="86">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="{Binding Root.BenchRpm, StringFormat=F0}"
|
|
FontSize="72" FontWeight="UltraBold" Foreground="#EBEBFF"
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
FontFamily="Consolas"/>
|
|
<TextBlock Grid.Column="1" Text="{DynamicResource Bench.Rpm}"
|
|
FontSize="20" Foreground="#FFFFEB6E"
|
|
VerticalAlignment="Center" Margin="6,0,0,0"/>
|
|
</Grid>
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
|
<TextBlock Text="{DynamicResource Bench.Target}" Foreground="#EBEBFF" FontSize="11" Margin="0,0,4,0"/>
|
|
<TextBlock Text="{Binding BenchControl.TargetRpm, StringFormat=F0}"
|
|
Foreground="#FFFFEB6E" FontSize="11" FontFamily="Consolas" Margin="0,0,8,0"/>
|
|
<TextBlock Text="{DynamicResource Bench.Voltage}" Foreground="#EBEBFF" FontSize="11" Margin="0,0,4,0"/>
|
|
<TextBlock Text="{Binding BenchControl.CommandVoltage, StringFormat=F3}"
|
|
Foreground="#FFFFEB6E" FontSize="11" FontFamily="Consolas"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- Pressures + temperatures side by side -->
|
|
<Grid Margin="0,0,0,4">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Border Grid.Column="0" Style="{StaticResource LcdBlue}" Margin="0,0,2,0" Padding="8,4">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="60"/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition Width="30"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Text="{DynamicResource Bench.P1}" Grid.Row="0" VerticalAlignment="Center" Foreground="#EBEBFF" FontSize="13"/>
|
|
<TextBlock Text="{DynamicResource Bench.P2}" Grid.Row="1" VerticalAlignment="Center" Foreground="#EBEBFF" FontSize="13"/>
|
|
<TextBlock Text="{Binding Root.Pressure, StringFormat=F1}" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Foreground="#EBEBFF" FontSize="22" FontFamily="Consolas"/>
|
|
<TextBlock Text="{Binding Root.Pressure2, StringFormat=F1}" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Foreground="#EBEBFF" FontSize="22" FontFamily="Consolas"/>
|
|
<TextBlock Text="bar" Grid.Row="0" Grid.Column="2" Foreground="#EBEBFF" FontSize="13" VerticalAlignment="Center" Margin="4,0"/>
|
|
<TextBlock Text="bar" Grid.Row="1" Grid.Column="2" Foreground="#EBEBFF" FontSize="13" VerticalAlignment="Center" Margin="4,0"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<Border Grid.Column="1" Style="{StaticResource LcdBlue}" Margin="2,0,0,0" Padding="8,4">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="60"/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition Width="30"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Text="{DynamicResource Bench.TempIn}" Grid.Row="0" VerticalAlignment="Center" Foreground="#EBEBFF" FontSize="13"/>
|
|
<TextBlock Text="{DynamicResource Bench.TempOut}" Grid.Row="1" VerticalAlignment="Center" Foreground="#EBEBFF" FontSize="13"/>
|
|
<TextBlock Text="{DynamicResource Bench.Temp4}" Grid.Row="2" VerticalAlignment="Center" Foreground="#EBEBFF" FontSize="13"/>
|
|
<TextBlock Text="{DynamicResource Bench.TempTank}" Grid.Row="3" VerticalAlignment="Center" Foreground="#EBEBFF" FontSize="13"/>
|
|
<TextBlock Text="{Binding Root.TempIn, StringFormat=F1}" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right" Foreground="#EBEBFF" FontSize="18" FontFamily="Consolas"/>
|
|
<TextBlock Text="{Binding Root.TempOut, StringFormat=F1}" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Foreground="#EBEBFF" FontSize="18" FontFamily="Consolas"/>
|
|
<TextBlock Text="{Binding Root.Temp4, StringFormat=F1}" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right" Foreground="#EBEBFF" FontSize="18" FontFamily="Consolas"/>
|
|
<TextBlock Text="{Binding Root.BenchTemp, StringFormat=F1}" Grid.Row="3" Grid.Column="1" HorizontalAlignment="Right" Foreground="#EBEBFF" FontSize="18" FontFamily="Consolas"/>
|
|
<TextBlock Text="°C" Grid.Row="0" Grid.Column="2" Foreground="#EBEBFF" FontSize="13" VerticalAlignment="Center" Margin="4,0"/>
|
|
<TextBlock Text="°C" Grid.Row="1" Grid.Column="2" Foreground="#EBEBFF" FontSize="13" VerticalAlignment="Center" Margin="4,0"/>
|
|
<TextBlock Text="°C" Grid.Row="2" Grid.Column="2" Foreground="#EBEBFF" FontSize="13" VerticalAlignment="Center" Margin="4,0"/>
|
|
<TextBlock Text="°C" Grid.Row="3" Grid.Column="2" Foreground="#EBEBFF" FontSize="13" VerticalAlignment="Center" Margin="4,0"/>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
|
|
<!-- Flow: QDelivery + QOver -->
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Border Grid.Column="0" Style="{StaticResource LcdBlue}" Margin="0,0,2,0" Padding="8,4">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="70"/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition Width="56"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="{DynamicResource Bench.QDelivery}" VerticalAlignment="Center" Foreground="#EBEBFF" FontSize="13"/>
|
|
<TextBlock Text="{Binding Root.QDelivery, StringFormat=F1}"
|
|
Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
Foreground="#EBEBFF" FontSize="22" FontFamily="Consolas"/>
|
|
<TextBlock Text="{DynamicResource Bench.CcStroke}" Grid.Column="2"
|
|
Foreground="#EBEBFF" FontSize="11" VerticalAlignment="Center" Margin="4,0"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<Border Grid.Column="1" Style="{StaticResource LcdBlue}" Margin="2,0,0,0" Padding="8,4">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="70"/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition Width="56"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="{DynamicResource Bench.QOver}" VerticalAlignment="Center" Foreground="#EBEBFF" FontSize="13"/>
|
|
<TextBlock Text="{Binding Root.QOver, StringFormat=F1}"
|
|
Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
Foreground="#EBEBFF" FontSize="22" FontFamily="Consolas"/>
|
|
<TextBlock Text="{DynamicResource Bench.CcStroke}" Grid.Column="2"
|
|
Foreground="#EBEBFF" FontSize="11" VerticalAlignment="Center" Margin="4,0"/>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
|
|
</StackPanel>
|
|
</UserControl>
|