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>
131 lines
8.1 KiB
XML
131 lines
8.1 KiB
XML
<UserControl x:Class="HC_APTBS.Views.UserControls.PumpLiveDataView"
|
|
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"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="380" d:DesignWidth="700">
|
|
<!--
|
|
Pump page §3.c Live Data. DataContext = PumpPageViewModel so the view
|
|
can reach the MainViewModel-owned live readings via {Binding Root.X}
|
|
and the two StatusDisplay VMs.
|
|
-->
|
|
<Border Background="#FAFAFA" BorderBrush="#DDD" BorderThickness="1"
|
|
CornerRadius="4" Padding="12" Margin="6">
|
|
<StackPanel>
|
|
|
|
<!-- ── Section title ─────────────────────────────────────────── -->
|
|
<TextBlock Text="{DynamicResource PumpSub.LiveData}"
|
|
FontSize="15" FontWeight="SemiBold" Foreground="#333"
|
|
Margin="0,0,0,8"/>
|
|
|
|
<!-- ── LCD-style readings block ──────────────────────────────── -->
|
|
<Border Style="{StaticResource LcdBlue}" Padding="10,6">
|
|
<Grid Height="110">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="90"/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition Width="60"/>
|
|
<ColumnDefinition Width="16"/>
|
|
<ColumnDefinition Width="90"/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition Width="60"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Left column: T-hyb / RPM / T-ein -->
|
|
<TextBlock Text="{DynamicResource Pump.THyb}"
|
|
VerticalAlignment="Center" Foreground="#EBEBFF" FontSize="13"/>
|
|
<TextBlock Text="{DynamicResource Pump.Rpm}"
|
|
Grid.Row="1" VerticalAlignment="Center" Foreground="#EBEBFF" FontSize="13"/>
|
|
<TextBlock Text="{DynamicResource Pump.TEin}"
|
|
Grid.Row="2" VerticalAlignment="Center" Foreground="#EBEBFF" FontSize="13"/>
|
|
|
|
<TextBlock Text="{Binding Root.PumpTemp, StringFormat=F2}"
|
|
Grid.Column="1"
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
Foreground="#EBEBFF" FontSize="22" FontWeight="Bold" FontFamily="Consolas"/>
|
|
<TextBlock Text="{Binding Root.PumpRpm, StringFormat=F0}"
|
|
Grid.Column="1" Grid.Row="1"
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
Foreground="#EBEBFF" FontSize="22" FontWeight="Bold" FontFamily="Consolas"/>
|
|
<TextBlock Text="{Binding Root.PumpTein, StringFormat=F0}"
|
|
Grid.Column="1" Grid.Row="2"
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
Foreground="#EBEBFF" FontSize="22" FontWeight="Bold" FontFamily="Consolas"/>
|
|
|
|
<TextBlock Text="°C" Grid.Column="2"
|
|
VerticalAlignment="Center" Foreground="#EBEBFF" FontSize="12" Margin="4,0"/>
|
|
<TextBlock Text="{DynamicResource Pump.UnitRpm}"
|
|
Grid.Column="2" Grid.Row="1"
|
|
VerticalAlignment="Center" Foreground="#EBEBFF" FontSize="12" Margin="4,0"/>
|
|
<TextBlock Text="µs" Grid.Column="2" Grid.Row="2"
|
|
VerticalAlignment="Center" Foreground="#EBEBFF" FontSize="12" Margin="4,0"/>
|
|
|
|
<!-- Right column: ME / FBKW -->
|
|
<TextBlock Text="{DynamicResource Bench.PumpMe}"
|
|
Grid.Column="4" VerticalAlignment="Center" Foreground="#EBEBFF" FontSize="13"/>
|
|
<TextBlock Text="{DynamicResource Bench.PumpFbkw}"
|
|
Grid.Column="4" Grid.Row="1"
|
|
VerticalAlignment="Center" Foreground="#EBEBFF" FontSize="13"/>
|
|
|
|
<TextBlock Text="{Binding Root.PumpMe, StringFormat=F2}"
|
|
Grid.Column="5"
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
Foreground="#EBEBFF" FontSize="22" FontWeight="Bold" FontFamily="Consolas"/>
|
|
<TextBlock Text="{Binding Root.PumpFbkw, StringFormat=F2}"
|
|
Grid.Column="5" Grid.Row="1"
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
Foreground="#EBEBFF" FontSize="22" FontWeight="Bold" FontFamily="Consolas"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- ── Status displays (Status word + Empf3) ─────────────────── -->
|
|
<StackPanel Margin="0,8,0,0">
|
|
<uc:StatusDisplayView DataContext="{Binding StatusDisplay1}"/>
|
|
<uc:StatusDisplayView DataContext="{Binding StatusDisplay2}" Margin="0,4,0,0"/>
|
|
</StackPanel>
|
|
|
|
<!-- ── Engineering expander (raw values) ─────────────────────── -->
|
|
<Expander Header="{DynamicResource PumpLive.Engineering}"
|
|
IsExpanded="False" Margin="0,10,0,0" FontSize="12">
|
|
<Border Background="#1E1E1E" Padding="10,6" CornerRadius="2">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Foreground="#9CDCFE" FontFamily="Consolas" FontSize="11">
|
|
<Run Text="PumpRpm = "/><Run Text="{Binding Root.PumpRpm, StringFormat=F2, Mode=OneWay}"/>
|
|
</TextBlock>
|
|
<TextBlock Foreground="#9CDCFE" FontFamily="Consolas" FontSize="11">
|
|
<Run Text="PumpTemp = "/><Run Text="{Binding Root.PumpTemp, StringFormat=F2, Mode=OneWay}"/>
|
|
</TextBlock>
|
|
<TextBlock Foreground="#9CDCFE" FontFamily="Consolas" FontSize="11">
|
|
<Run Text="PumpMe = "/><Run Text="{Binding Root.PumpMe, StringFormat=F3, Mode=OneWay}"/>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="1">
|
|
<TextBlock Foreground="#9CDCFE" FontFamily="Consolas" FontSize="11">
|
|
<Run Text="PumpFbkw = "/><Run Text="{Binding Root.PumpFbkw, StringFormat=F3, Mode=OneWay}"/>
|
|
</TextBlock>
|
|
<TextBlock Foreground="#9CDCFE" FontFamily="Consolas" FontSize="11">
|
|
<Run Text="PumpTein = "/><Run Text="{Binding Root.PumpTein, StringFormat=F0, Mode=OneWay}"/>
|
|
</TextBlock>
|
|
<TextBlock Foreground="#9CDCFE" FontFamily="Consolas" FontSize="11">
|
|
<Run Text="KLineState = "/><Run Text="{Binding Root.KLineState, Mode=OneWay}"/>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</Expander>
|
|
</StackPanel>
|
|
</Border>
|
|
</UserControl>
|