feat: redesign Pump page with Fluent card layout, bottom snackbar, and RPM chart

- Replace sub-nav + HiddenTabsTabControl with 3-column Fluent card layout:
  PumpCommandsCard (vertical ME/FBKW/PreIn sliders) + DfiCalibrationCard /
  PumpLiveDataCard (KPI tiles + RPM rolling chart + redesigned status bytes) /
  PumpIdentificationCard + DtcCard
- Add PumpTopStripView: pump selector, model badge, CAN + K-Line chips
- Move immobilizer unlock to MainWindow bottom snackbar (UnlockSnackbarView):
  auto-close on success after 3 s, persist on failure with manual Dismiss
- Redesign StatusDisplayView to 2×8 rounded 28px tiles with bit index + tooltip
- Add NullToVisibilityConverter; add SnackbarShell, PumpCard, and related styles
- Delete obsolete views: UnlockProgressDialog, UnlockPanelView,
  PumpIdentificationPanelView, PumpLiveDataView, DfiManageView,
  DtcListView, PumpControlView
- PumpPageViewModel: remove PumpSubPage enum, add RpmChart wired to Root.PumpRpm

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-20 14:03:47 +02:00
parent 197e9d1775
commit 70be693116
37 changed files with 1356 additions and 1317 deletions

View File

@@ -5,7 +5,7 @@
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">
d:DesignHeight="90" d:DesignWidth="340">
<UserControl.Resources>
<conv:HexColorToBrushConverter x:Key="HexToBrush"/>
@@ -13,45 +13,70 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="28"/>
<RowDefinition/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- Title -->
<TextBlock Text="{Binding Title}"
HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="14" FontWeight="SemiBold" Foreground="Black"/>
<!-- Header: title (left) + "Active: n/16" chip (right) -->
<DockPanel Margin="0,0,0,6">
<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.Status.Active}"
FontSize="11" FontFamily="{DynamicResource ContentControlThemeFontFamily}"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Margin="0,0,3,0"/>
<TextBlock Text=": " FontSize="11"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"/>
<TextBlock Text="{Binding ActiveCount}"
FontSize="11" FontWeight="SemiBold"
Foreground="{DynamicResource TextFillColorPrimaryBrush}"/>
<TextBlock Text="/16" FontSize="11"
Foreground="{DynamicResource TextFillColorTertiaryBrush}"/>
</StackPanel>
</Border>
<TextBlock Text="{Binding Title}"
FontSize="12" FontWeight="SemiBold"
FontFamily="{DynamicResource ContentControlThemeFontFamily}"
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
VerticalAlignment="Center"/>
</DockPanel>
<!-- 16-bit indicator row -->
<ItemsControl Grid.Row="1"
ItemsSource="{Binding Bits}"
Margin="10,0,10,6">
<!-- 2×8 grid of rounded bit tiles -->
<ItemsControl Grid.Row="1" ItemsSource="{Binding Bits}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Rows="1"/>
<UniformGrid Rows="2" Columns="8"/>
</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"
<Border Margin="2" CornerRadius="4"
BorderThickness="1"
BorderBrush="{DynamicResource ControlStrokeColorDefaultBrush}"
MinWidth="28" MinHeight="28"
Background="{Binding Color, Converter={StaticResource HexToBrush}}"
ToolTip="{Binding Description}"
ToolTipService.InitialShowDelay="150"
ToolTipService.ShowDuration="30000"
SnapsToDevicePixels="True">
<TextBlock Text="{Binding Index}"
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>
FontSize="11" FontWeight="SemiBold">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsActive}" Value="True">
<Setter Property="Foreground" Value="#FFFFFF"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>