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>
65 lines
2.8 KiB
XML
65 lines
2.8 KiB
XML
<UserControl x:Class="HC_APTBS.Views.UserControls.TestPlanView"
|
|
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"
|
|
xmlns:uc="clr-namespace:HC_APTBS.Views.UserControls"
|
|
xmlns:vm="clr-namespace:HC_APTBS.ViewModels"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="520" d:DesignWidth="900"
|
|
Background="#FFEDEDED" Foreground="Black"
|
|
d:DataContext="{d:DesignInstance Type=vm:TestPanelViewModel, IsDesignTimeCreatable=False}">
|
|
<!--
|
|
Plan step of the Tests wizard. DataContext: TestPanelViewModel.
|
|
The operator picks which test phases to run — no Start/Stop/Report buttons,
|
|
those live on the Preconditions step and in the wizard footer.
|
|
-->
|
|
<UserControl.Resources>
|
|
<DataTemplate DataType="{x:Type vm:TestSectionViewModel}">
|
|
<uc:TestSectionView/>
|
|
</DataTemplate>
|
|
</UserControl.Resources>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Toolbar -->
|
|
<Border BorderBrush="Gray" BorderThickness="0,0,0,1" Padding="8,4">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<CheckBox IsChecked="{Binding ShowOperationValues}"
|
|
VerticalAlignment="Center">
|
|
<TextBlock Text="{DynamicResource Test.ShowValues}" FontSize="12"/>
|
|
</CheckBox>
|
|
|
|
<Button Grid.Column="1" Margin="12,0,0,0"
|
|
Command="{Binding ToggleCheckAllCommand}"
|
|
Padding="6,2" ToolTip="Enable/disable all phases">
|
|
<TextBlock Text="{DynamicResource Test.CheckAll}" FontSize="11"/>
|
|
</Button>
|
|
|
|
<TextBlock Grid.Column="3" VerticalAlignment="Center"
|
|
Foreground="DimGray" FontSize="12" Margin="0,0,4,0">
|
|
<Run Text="~"/>
|
|
<Run Text="{Binding RemainingSeconds, Mode=OneWay}"/>
|
|
<Run Text="{DynamicResource Test.SecondsRemaining}"/>
|
|
</TextBlock>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Test sections -->
|
|
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
|
|
<ItemsControl ItemsSource="{Binding Tests}" Margin="4"/>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</UserControl>
|