Files
HC_APTBS/Views/UserControls/BenchParamConfigView.xaml
LucianoDev 37d099cdbd 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>
2026-04-16 13:22:48 +02:00

78 lines
4.7 KiB
XML

<UserControl x:Class="HC_APTBS.Views.UserControls.BenchParamConfigView"
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"
HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,7">
<UserControl.Resources>
<BooleanToVisibilityConverter x:Key="BoolToVis"/>
</UserControl.Resources>
<Border BorderBrush="Black" BorderThickness="2" Padding="8">
<StackPanel>
<!-- Parameter name -->
<TextBlock Text="{Binding Name}"
FontSize="16" FontWeight="Bold" Foreground="Black"
Margin="0,0,0,4"/>
<Separator Margin="0,0,0,6"/>
<!-- CAN frame fields -->
<WrapPanel Margin="0,0,0,4">
<Label Content="{DynamicResource BenchParam.CanBusId}" VerticalAlignment="Bottom" Foreground="Black"/>
<TextBox Text="{Binding MessageIdHex, UpdateSourceTrigger=LostFocus}"
Width="40" VerticalAlignment="Center"
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19"/>
<Label Content="{DynamicResource BenchParam.ByteL}" VerticalAlignment="Bottom" Foreground="Black" Margin="8,0,0,0"/>
<TextBox Text="{Binding ByteL, UpdateSourceTrigger=LostFocus}"
Width="35" VerticalAlignment="Center"
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19"/>
<Label Content="{DynamicResource BenchParam.ByteH}" VerticalAlignment="Bottom" Foreground="Black" Margin="8,0,0,0"/>
<TextBox Text="{Binding ByteH, UpdateSourceTrigger=LostFocus}"
Width="35" VerticalAlignment="Center"
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19"/>
<Label Content="{DynamicResource BenchParam.FilterAlpha}" VerticalAlignment="Bottom" Foreground="Black" Margin="8,0,0,0"/>
<TextBox Text="{Binding Alpha, UpdateSourceTrigger=LostFocus}"
Width="40" VerticalAlignment="Center"
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19"/>
<CheckBox Content="{DynamicResource BenchParam.EnableFormula}" IsChecked="{Binding FormulaEnabled}"
VerticalAlignment="Center" Foreground="Black" Margin="12,0,0,0"/>
</WrapPanel>
<!-- Calibration coefficients — visible only when formula is enabled -->
<WrapPanel Margin="0,2,0,0"
Visibility="{Binding FormulaEnabled, Converter={StaticResource BoolToVis}}">
<Label Content="P1:" Foreground="Black"/>
<TextBox Text="{Binding P1, UpdateSourceTrigger=LostFocus}"
Width="45" VerticalAlignment="Center" FontSize="13"
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19" Margin="0,0,8,0"/>
<Label Content="P2:" Foreground="Black"/>
<TextBox Text="{Binding P2, UpdateSourceTrigger=LostFocus}"
Width="45" VerticalAlignment="Center" FontSize="13"
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19" Margin="0,0,8,0"/>
<Label Content="P3:" Foreground="Black"/>
<TextBox Text="{Binding P3, UpdateSourceTrigger=LostFocus}"
Width="45" VerticalAlignment="Center" FontSize="13"
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19" Margin="0,0,8,0"/>
<Label Content="P4:" Foreground="Black"/>
<TextBox Text="{Binding P4, UpdateSourceTrigger=LostFocus}"
Width="45" VerticalAlignment="Center" FontSize="13"
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19" Margin="0,0,8,0"/>
<Label Content="P5:" Foreground="Black"/>
<TextBox Text="{Binding P5, UpdateSourceTrigger=LostFocus}"
Width="45" VerticalAlignment="Center" FontSize="13"
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19" Margin="0,0,8,0"/>
<Label Content="P6:" Foreground="Black"/>
<TextBox Text="{Binding P6, UpdateSourceTrigger=LostFocus}"
Width="45" VerticalAlignment="Center" FontSize="13"
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19"/>
</WrapPanel>
</StackPanel>
</Border>
</UserControl>