- 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>
85 lines
4.4 KiB
XML
85 lines
4.4 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="90" d:DesignWidth="340">
|
||
|
||
<UserControl.Resources>
|
||
<conv:HexColorToBrushConverter x:Key="HexToBrush"/>
|
||
</UserControl.Resources>
|
||
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto"/>
|
||
<RowDefinition Height="*"/>
|
||
</Grid.RowDefinitions>
|
||
|
||
<!-- 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>
|
||
|
||
<!-- 2×8 grid of rounded bit tiles -->
|
||
<ItemsControl Grid.Row="1" ItemsSource="{Binding Bits}">
|
||
<ItemsControl.ItemsPanel>
|
||
<ItemsPanelTemplate>
|
||
<UniformGrid Rows="2" Columns="8"/>
|
||
</ItemsPanelTemplate>
|
||
</ItemsControl.ItemsPanel>
|
||
<ItemsControl.ItemTemplate>
|
||
<DataTemplate>
|
||
<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"
|
||
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>
|
||
</Grid>
|
||
</UserControl>
|