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>
125 lines
7.7 KiB
XML
125 lines
7.7 KiB
XML
<Window x:Class="HC_APTBS.Views.Dialogs.ReportDialog"
|
|
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.Report.Title}"
|
|
Height="450" Width="800"
|
|
ResizeMode="NoResize"
|
|
WindowStartupLocation="CenterOwner">
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/> <!-- Section labels row -->
|
|
<RowDefinition Height="Auto"/> <!-- Name row -->
|
|
<RowDefinition Height="130"/> <!-- Info text -->
|
|
<RowDefinition Height="120"/> <!-- Observations / operator -->
|
|
<RowDefinition Height="Auto"/> <!-- Buttons -->
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="180"/> <!-- Client list -->
|
|
<ColumnDefinition Width="1*"/> <!-- Client data -->
|
|
<ColumnDefinition Width="1*"/> <!-- Company data -->
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- ── Column separators ───────────────────────────────────────────── -->
|
|
<Border BorderBrush="DarkGray" BorderThickness="1,0,0,0"
|
|
Grid.Column="2" Grid.RowSpan="5" Margin="-3,10,0,0"/>
|
|
|
|
<!-- ── Section headers ─────────────────────────────────────────────── -->
|
|
<TextBlock Text="{DynamicResource Dialog.Report.ClientList}" FontSize="14" FontWeight="SemiBold"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10"/>
|
|
<TextBlock Grid.Column="1" Text="{DynamicResource Dialog.Report.ClientData}" FontSize="20" FontWeight="SemiBold"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10"/>
|
|
<TextBlock Grid.Column="2" Text="{DynamicResource Dialog.Report.CompanyData}" FontSize="20" FontWeight="SemiBold"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10"/>
|
|
|
|
<!-- ── Client list ─────────────────────────────────────────────────── -->
|
|
<ListBox Grid.Row="1" Grid.RowSpan="3" Margin="10,0"
|
|
ItemsSource="{Binding ClientNames}"
|
|
SelectedItem="{Binding SelectedClientName}"/>
|
|
|
|
<!-- ── Client name (editable ComboBox) ─────────────────────────────── -->
|
|
<Grid Grid.Column="1" Grid.Row="1" Margin="8,6">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Label Content="{DynamicResource Dialog.Report.Name}" VerticalAlignment="Center" FontSize="13"/>
|
|
<ComboBox Grid.Column="1" IsEditable="True"
|
|
ItemsSource="{Binding ClientNames}"
|
|
Text="{Binding SelectedClientName, UpdateSourceTrigger=PropertyChanged}"
|
|
VerticalAlignment="Center" FontSize="13" Margin="4,0"/>
|
|
<Button Grid.Column="2" Content="{DynamicResource Common.Save}" Width="60" Height="24"
|
|
Command="{Binding SaveClientCommand}"/>
|
|
</Grid>
|
|
|
|
<!-- ── Client info text ─────────────────────────────────────────────── -->
|
|
<GroupBox Grid.Column="1" Grid.Row="2" Header="{DynamicResource Dialog.Report.ClientInfo}"
|
|
Margin="8,0,8,4" FontSize="13">
|
|
<TextBox Text="{Binding ClientInfo, UpdateSourceTrigger=PropertyChanged}"
|
|
TextWrapping="Wrap" AcceptsReturn="True"
|
|
BorderBrush="{x:Null}" FontSize="12"/>
|
|
</GroupBox>
|
|
|
|
<!-- ── Observations ─────────────────────────────────────────────────── -->
|
|
<GroupBox Grid.Column="1" Grid.Row="3" Header="{DynamicResource Dialog.Report.Observations}"
|
|
Margin="8,0,8,4" FontSize="13">
|
|
<TextBox Text="{Binding Observations, UpdateSourceTrigger=PropertyChanged}"
|
|
TextWrapping="Wrap"
|
|
BorderBrush="{x:Null}" FontSize="12"/>
|
|
</GroupBox>
|
|
|
|
<!-- ── Operator name ────────────────────────────────────────────────── -->
|
|
<Grid Grid.Column="2" Grid.Row="1" Margin="8,6">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<Label Content="{DynamicResource Dialog.Report.Operator}" VerticalAlignment="Center" FontSize="13"/>
|
|
<TextBox Grid.Column="1" Text="{Binding OperatorName, UpdateSourceTrigger=PropertyChanged}"
|
|
VerticalAlignment="Center" FontSize="13" Margin="4,0" Height="24"
|
|
IsReadOnly="True" Background="#F0F0F0"/>
|
|
</Grid>
|
|
|
|
<!-- ── Company name ─────────────────────────────────────────────────── -->
|
|
<Grid Grid.Column="2" Grid.Row="2" Margin="8,0,8,4" VerticalAlignment="Top">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<Label Content="{DynamicResource Dialog.Report.Company}" VerticalAlignment="Center" FontSize="13"/>
|
|
<TextBox Grid.Column="1" Text="{Binding CompanyName, UpdateSourceTrigger=PropertyChanged}"
|
|
VerticalAlignment="Center" FontSize="13" Margin="4,0" Height="24"/>
|
|
</Grid>
|
|
<GroupBox Grid.Row="1" Header="{DynamicResource Dialog.Report.CompanyInfo}"
|
|
Margin="0,4,0,0" FontSize="13">
|
|
<TextBox Text="{Binding CompanyInfo, UpdateSourceTrigger=PropertyChanged}"
|
|
TextWrapping="Wrap" AcceptsReturn="True"
|
|
BorderBrush="{x:Null}" FontSize="12"/>
|
|
</GroupBox>
|
|
</Grid>
|
|
|
|
<!-- ── Buttons row ──────────────────────────────────────────────────── -->
|
|
<Button Grid.Row="4" Grid.Column="0"
|
|
Content="{DynamicResource Dialog.Report.DeleteClient}" Padding="6,2" Margin="10,8,0,8"
|
|
HorizontalAlignment="Left"
|
|
Command="{Binding DeleteClientCommand}"/>
|
|
|
|
<StackPanel Grid.Row="4" Grid.Column="2"
|
|
Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,8,10,8">
|
|
<Button Content="{DynamicResource Dialog.Report.Generate}" Width="80" Height="24" Margin="0,0,8,0"
|
|
Command="{Binding AcceptCommand}"/>
|
|
<Button Content="{DynamicResource Common.Cancel}" Width="80" Height="24"
|
|
Command="{Binding CancelCommand}"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Window>
|