feat: page-based navigation shell + Tests page wizard

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>
This commit is contained in:
2026-04-18 13:11:34 +02:00
parent 37d099cdbd
commit 0280a2fad1
110 changed files with 8008 additions and 1115 deletions

View File

@@ -0,0 +1,103 @@
<UserControl x:Class="HC_APTBS.Views.UserControls.TemperatureControlView"
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="230" d:DesignWidth="190">
<!--
Temperature control panel: PID setpoint + heater / cooler relay toggles.
DataContext = TemperatureControlViewModel.
-->
<Border Background="#FAFAFA" BorderBrush="#DDD" BorderThickness="1" CornerRadius="4" Padding="8">
<StackPanel>
<TextBlock Text="{DynamicResource Bench.TempControl}"
FontSize="13" FontWeight="SemiBold" Foreground="#333"
Margin="0,0,0,6"/>
<!-- PID setpoint -->
<TextBlock Text="{DynamicResource Bench.Setpoint}" FontSize="10" Foreground="DimGray"/>
<Grid Margin="0,2,0,6">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox Text="{Binding SetpointText, UpdateSourceTrigger=PropertyChanged}"
FontSize="16" FontFamily="Consolas" Height="26"
VerticalContentAlignment="Center"/>
<TextBlock Grid.Column="1" Text="°C" VerticalAlignment="Center"
Margin="6,0,0,0" Foreground="#555"/>
</Grid>
<TextBlock Text="{DynamicResource Bench.Tolerance}" FontSize="10" Foreground="DimGray"/>
<Grid Margin="0,2,0,6">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox Text="{Binding ToleranceText, UpdateSourceTrigger=PropertyChanged}"
FontSize="13" FontFamily="Consolas" Height="22"
VerticalContentAlignment="Center"/>
<TextBlock Grid.Column="1" Text="± °C" VerticalAlignment="Center"
Margin="6,0,0,0" Foreground="#555"/>
</Grid>
<Button Content="{DynamicResource Bench.ApplySetpoint}" Height="26" FontSize="11"
FontWeight="SemiBold"
Command="{Binding ApplySetpointCommand}"/>
<!-- Heater / Cooler toggles -->
<TextBlock Text="{DynamicResource Bench.DepositHeater}" FontSize="10" Foreground="DimGray" Margin="0,10,0,2"/>
<ToggleButton IsChecked="{Binding IsHeaterOn}" Height="28" FontSize="11" FontWeight="SemiBold">
<ToggleButton.Style>
<Style TargetType="ToggleButton">
<Setter Property="Content" Value="{DynamicResource Bench.RelayOff}"/>
<Setter Property="Background" Value="LightGray"/>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Content" Value="{DynamicResource Bench.RelayOn}"/>
<Setter Property="Background" Value="#FFB020"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
</ToggleButton.Style>
</ToggleButton>
<TextBlock Text="{DynamicResource Bench.DepositCooler}" FontSize="10" Foreground="DimGray" Margin="0,6,0,2"/>
<ToggleButton IsChecked="{Binding IsDepositCoolerOn}" Height="28" FontSize="11" FontWeight="SemiBold">
<ToggleButton.Style>
<Style TargetType="ToggleButton">
<Setter Property="Content" Value="{DynamicResource Bench.RelayOff}"/>
<Setter Property="Background" Value="LightGray"/>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Content" Value="{DynamicResource Bench.RelayOn}"/>
<Setter Property="Background" Value="#4080FF"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
</ToggleButton.Style>
</ToggleButton>
<TextBlock Text="{DynamicResource Bench.TinCooler}" FontSize="10" Foreground="DimGray" Margin="0,6,0,2"/>
<ToggleButton IsChecked="{Binding IsTinCoolerOn}" Height="28" FontSize="11" FontWeight="SemiBold">
<ToggleButton.Style>
<Style TargetType="ToggleButton">
<Setter Property="Content" Value="{DynamicResource Bench.RelayOff}"/>
<Setter Property="Background" Value="LightGray"/>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Content" Value="{DynamicResource Bench.RelayOn}"/>
<Setter Property="Background" Value="#26C200"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
</ToggleButton.Style>
</ToggleButton>
</StackPanel>
</Border>
</UserControl>