feat: add Ford VP44 unlock progress dialog, K-Line fast unlock, localization, safety dialogs, and settings
Unlock progress UI:
- UnlockProgressDialog with dark-themed progress ring, phase indicator, elapsed
time, and cancel/close buttons (non-modal, draggable borderless window)
- UnlockProgressViewModel with event-driven progress tracking via IUnlockService
- Triggers on pump selection (manual or K-Line auto-detect), not test start
UnlockService rewrite:
- Persistent CAN senders that outlive the unlock sequence (StopSenders on pump change)
- Concurrent K-Line fast unlock: awaits session Connected, sends RAM timer shortcut
({02 88 02 03 A8 01 00}), verifies via CAN TestUnlock before skipping wait
- Fix Type 1 verification (Value == 0 means unlocked, was inverted)
K-Line fast unlock support:
- IKwpService.TryFastUnlockAsync / KwpService implementation
Additional features:
- ILocalizationService with ES/EN resource dictionaries and runtime switching
- Safety dialogs: VoltageWarning, OilPumpConfirm, RpmSafetyWarning
- SettingsDialog for app configuration
- BenchService enhancements, ConfigurationService improvements, PDF report updates
- All UI strings localized via DynamicResource
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
63
Views/Dialogs/RpmSafetyWarningDialog.xaml
Normal file
63
Views/Dialogs/RpmSafetyWarningDialog.xaml
Normal file
@@ -0,0 +1,63 @@
|
||||
<Window x:Class="HC_APTBS.Views.Dialogs.RpmSafetyWarningDialog"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
Title="{DynamicResource Dialog.RpmSafety.Title}"
|
||||
Height="260" Width="460"
|
||||
ResizeMode="NoResize"
|
||||
WindowStartupLocation="CenterOwner">
|
||||
|
||||
<Grid Margin="16,12">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="48"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Warning icon -->
|
||||
<TextBlock Grid.RowSpan="5" Text="⚠"
|
||||
FontSize="36" Foreground="DarkOrange"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Center"
|
||||
Margin="0,4,8,0"/>
|
||||
|
||||
<!-- Title -->
|
||||
<TextBlock Grid.Column="1" Text="{DynamicResource Common.Warning}"
|
||||
FontSize="18" FontWeight="Bold" Foreground="DarkOrange"
|
||||
Margin="0,0,0,8"/>
|
||||
|
||||
<!-- Warning message -->
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" TextWrapping="Wrap"
|
||||
Margin="0,0,0,12"
|
||||
Text="{DynamicResource Dialog.RpmSafety.Message}"/>
|
||||
|
||||
<!-- Option 1: Turn on oil and proceed -->
|
||||
<RadioButton Grid.Row="2" Grid.Column="1" Margin="0,4"
|
||||
GroupName="RpmSafety"
|
||||
IsChecked="{Binding IsOilAndProceedSelected}"
|
||||
Content="{DynamicResource Dialog.RpmSafety.OilAndProceed}"/>
|
||||
|
||||
<!-- Option 2: Proceed without oil -->
|
||||
<RadioButton Grid.Row="3" Grid.Column="1" Margin="0,4"
|
||||
GroupName="RpmSafety"
|
||||
IsChecked="{Binding IsProceedWithoutOilSelected}"
|
||||
Content="{DynamicResource Dialog.RpmSafety.ProceedWithout}"/>
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Grid.Row="5" Grid.Column="1"
|
||||
Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,12,0,0">
|
||||
<Button Content="{DynamicResource Common.Accept}" Width="80" Height="26" Margin="0,0,8,0"
|
||||
Command="{Binding AcceptCommand}"/>
|
||||
<Button Content="{DynamicResource Common.Cancel}" Width="80" Height="26"
|
||||
Command="{Binding CancelCommand}" IsCancel="True"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user