Bundles several feature streams that have been iterating on the working tree: - Developer Tools page (Debug-only via DEVELOPER_TOOLS symbol): hosts the identification card, manual KWP write + transaction log, ROM/EEPROM dump card with progress banner and completion message, persisted custom-commands library, persisted EEPROM passwords library. New service primitives: IKwpService.SendRawCustomAsync / ReadEepromAsync / ReadRomEepromAsync. Persistence mirrors the Clients XML pattern in two new files (custom_commands.xml, eeprom_passwords.xml). - Auto-test orchestrator (IAutoTestOrchestrator + AutoTestState): linear K-Line read -> unlock -> bench-on -> test sequence with snackbar UI and progress dialog VM, gated on dashboard alarms. - BIP-STATUS display: BipDisplayViewModel + BipDisplayView, RAM read at 0x0106 via IKwpService.ReadBipStatusAsync; status definitions in BipStatusDefinition. - Tests page redesign: TestSectionCard + PhaseTileView replacing the old TestPlanView/TestRunningView/TestDoneView/TestPreconditionsView/ TestSectionView controls and their VMs. - Pump command sliders: Fluent thick-track style with overhang thumb, click-anywhere-and-drag, mouse-wheel adjustment. - Window startup: app.manifest declares PerMonitorV2 DPI awareness, MainWindow installs a WM_GETMINMAXINFO hook in OnSourceInitialized and maximizes there (after the hook is in place) so the app fits the work area exactly on any display configuration. - Misc: PercentToPixelsConverter, seed_aliases.py one-shot pump-alias importer, tools/Import-BipStatus.ps1, kline_eeprom_spec.md and dump-functions reference docs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
114 lines
6.1 KiB
XML
114 lines
6.1 KiB
XML
<UserControl x:Class="HC_APTBS.Views.UserControls.BipDisplayView"
|
|
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="160" d:DesignWidth="480">
|
|
|
|
<UserControl.Resources>
|
|
<conv:HexColorToBrushConverter x:Key="HexToBrush"/>
|
|
<BooleanToVisibilityConverter x:Key="BoolToVis"/>
|
|
</UserControl.Resources>
|
|
|
|
<!-- Outer visibility: hidden for non-PSG5-PI pumps -->
|
|
<Grid Visibility="{Binding HasDefinition, Converter={StaticResource BoolToVis}}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Header bar: title + raw word chip -->
|
|
<DockPanel Margin="0,0,0,4">
|
|
<Border DockPanel.Dock="Right"
|
|
Background="{DynamicResource ControlFillColorSecondaryBrush}"
|
|
BorderBrush="{DynamicResource ControlStrokeColorDefaultBrush}"
|
|
BorderThickness="1" CornerRadius="10" Padding="8,2">
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
|
<TextBlock Text="{DynamicResource Pump.Bip.RawLabel}" FontSize="11"
|
|
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
|
Margin="0,0,3,0"/>
|
|
<TextBlock Text="{Binding RawValue}"
|
|
FontSize="11" FontWeight="SemiBold"
|
|
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
|
FontFamily="Consolas, Courier New"/>
|
|
</StackPanel>
|
|
</Border>
|
|
<TextBlock Text="{DynamicResource Pump.Bip.Title}"
|
|
FontSize="12" FontWeight="SemiBold"
|
|
FontFamily="{DynamicResource ContentControlThemeFontFamily}"
|
|
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
|
VerticalAlignment="Center"/>
|
|
</DockPanel>
|
|
|
|
<!-- BIP rows table -->
|
|
<ItemsControl Grid.Row="1" ItemsSource="{Binding Rows}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Vertical"/>
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border Margin="0,1" CornerRadius="4"
|
|
BorderThickness="1"
|
|
BorderBrush="{DynamicResource ControlStrokeColorDefaultBrush}"
|
|
Padding="6,3"
|
|
Background="{DynamicResource ControlFillColorDefaultBrush}"
|
|
SnapsToDevicePixels="True">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="22"/>
|
|
<ColumnDefinition Width="16"/>
|
|
<ColumnDefinition Width="58"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Colour indicator dot -->
|
|
<Ellipse Grid.Column="0"
|
|
Width="10" Height="10"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
Fill="{Binding Color, Converter={StaticResource HexToBrush}}"/>
|
|
|
|
<!-- Index label -->
|
|
<TextBlock Grid.Column="1"
|
|
Text="{Binding Index}"
|
|
FontSize="11" FontWeight="SemiBold" VerticalAlignment="Center"
|
|
Foreground="{DynamicResource TextFillColorSecondaryBrush}"/>
|
|
|
|
<!-- HEX pattern -->
|
|
<TextBlock Grid.Column="2"
|
|
Text="{Binding HexPattern}"
|
|
FontSize="11" FontFamily="Consolas, Courier New"
|
|
VerticalAlignment="Center"
|
|
Foreground="{DynamicResource TextFillColorSecondaryBrush}"/>
|
|
|
|
<!-- Description -->
|
|
<TextBlock Grid.Column="3"
|
|
Text="{Binding Description}"
|
|
FontSize="11" VerticalAlignment="Center"
|
|
TextTrimming="CharacterEllipsis"
|
|
ToolTip="{Binding Description}"
|
|
ToolTipService.InitialShowDelay="200"
|
|
ToolTipService.ShowDuration="30000">
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock">
|
|
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsActive}" Value="True">
|
|
<Setter Property="Foreground" Value="#FF4444"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</Grid>
|
|
</UserControl>
|