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:
@@ -22,15 +22,17 @@ namespace HC_APTBS.ViewModels
|
||||
|
||||
private readonly IKwpService _kwp;
|
||||
private readonly IConfigurationService _config;
|
||||
private readonly ILocalizationService _loc;
|
||||
private const string LogId = "DfiManageViewModel";
|
||||
|
||||
// ── Constructor ───────────────────────────────────────────────────────────
|
||||
|
||||
/// <summary>Initialises the ViewModel with the required services.</summary>
|
||||
public DfiManageViewModel(IKwpService kwpService, IConfigurationService configService)
|
||||
public DfiManageViewModel(IKwpService kwpService, IConfigurationService configService, ILocalizationService loc)
|
||||
{
|
||||
_kwp = kwpService;
|
||||
_config = configService;
|
||||
_loc = loc;
|
||||
|
||||
// Update the slider and LCD display in real time when the DFI is
|
||||
// read during a full K-Line read (PumpIdentificationViewModel flow).
|
||||
@@ -106,8 +108,8 @@ namespace HC_APTBS.ViewModels
|
||||
string? port = _kwp.DetectKLinePort();
|
||||
if (string.IsNullOrEmpty(port))
|
||||
{
|
||||
MessageBox.Show("K-Line device not found. Check that the FTDI adapter is connected.",
|
||||
"K-Line Error", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
MessageBox.Show(_loc.GetString("Error.KLineNotFound"),
|
||||
_loc.GetString("Error.KLineTitle"), MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -138,8 +140,8 @@ namespace HC_APTBS.ViewModels
|
||||
string? port = _kwp.DetectKLinePort();
|
||||
if (string.IsNullOrEmpty(port))
|
||||
{
|
||||
MessageBox.Show("K-Line device not found. Check that the FTDI adapter is connected.",
|
||||
"K-Line Error", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
MessageBox.Show(_loc.GetString("Error.KLineNotFound"),
|
||||
_loc.GetString("Error.KLineTitle"), MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user