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>
60 lines
2.7 KiB
XML
60 lines
2.7 KiB
XML
<UserControl x:Class="HC_APTBS.Views.UserControls.StatusDisplayView"
|
|
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:conv="clr-namespace:HC_APTBS.Converters"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="70" d:DesignWidth="375">
|
|
|
|
<UserControl.Resources>
|
|
<conv:HexColorToBrushConverter x:Key="HexToBrush"/>
|
|
</UserControl.Resources>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="28"/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Title -->
|
|
<TextBlock Text="{Binding Title}"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
FontSize="14" FontWeight="SemiBold" Foreground="Black"/>
|
|
|
|
<!-- 16-bit indicator row -->
|
|
<ItemsControl Grid.Row="1"
|
|
ItemsSource="{Binding Bits}"
|
|
Margin="10,0,10,6">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<UniformGrid Rows="1"/>
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<!-- Each bit: coloured dot + bit-number label -->
|
|
<Grid Margin="1,0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="3*"/>
|
|
<RowDefinition Height="2*"/>
|
|
</Grid.RowDefinitions>
|
|
<Rectangle Fill="{Binding Color, Converter={StaticResource HexToBrush}}"
|
|
Stroke="#5D5D5D" StrokeThickness="1"
|
|
Width="16" Height="10"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
ToolTip="{Binding Description}"
|
|
ToolTipService.InitialShowDelay="150"
|
|
ToolTipService.ShowDuration="30000"
|
|
SnapsToDevicePixels="True"/>
|
|
<TextBlock Grid.Row="1" FontSize="12"
|
|
Text="{Binding Index}"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
Foreground="DimGray"/>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</Grid>
|
|
</UserControl>
|