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>
76 lines
3.7 KiB
XML
76 lines
3.7 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:conv="clr-namespace:HC_APTBS.Converters">
|
|
|
|
<!-- Shared converter: enum ↔ int for TabControl.SelectedIndex -->
|
|
<conv:EnumToIntConverter x:Key="EnumToInt"/>
|
|
|
|
<!-- Nav rail ListBoxItem: 56px tall, left accent bar on selection -->
|
|
<Style x:Key="NavItem" TargetType="ListBoxItem">
|
|
<Setter Property="Height" Value="56"/>
|
|
<Setter Property="Padding" Value="0"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ListBoxItem">
|
|
<Border x:Name="Root" Background="Transparent">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="4"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Border x:Name="Accent" Grid.Column="0" Background="Transparent"/>
|
|
<ContentPresenter Grid.Column="1"
|
|
VerticalAlignment="Center"
|
|
Margin="16,0,0,0"/>
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Root" Property="Background" Value="#FF3A4050"/>
|
|
</Trigger>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter TargetName="Root" Property="Background" Value="#FF404860"/>
|
|
<Setter TargetName="Accent" Property="Background" Value="#FF2196F3"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- Nav rail ListBox -->
|
|
<Style x:Key="NavRail" TargetType="ListBox">
|
|
<Setter Property="Background" Value="#FF2F3440"/>
|
|
<Setter Property="Foreground" Value="#FFE6E6E6"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="Padding" Value="0"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
|
|
<Setter Property="ItemContainerStyle" Value="{StaticResource NavItem}"/>
|
|
</Style>
|
|
|
|
<!-- TabControl that hides its tab strip so the nav rail is the only selector -->
|
|
<Style x:Key="HiddenTabsTabControl" TargetType="TabControl">
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="Padding" Value="0"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="TabControl">
|
|
<Grid>
|
|
<!-- TabPanel renders the headers; we collapse it entirely -->
|
|
<TabPanel x:Name="HeaderPanel" Visibility="Collapsed"
|
|
IsItemsHost="True"/>
|
|
<ContentPresenter x:Name="PART_SelectedContentHost"
|
|
ContentSource="SelectedContent"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
</ResourceDictionary>
|