feat: redesign dashboard with Fluent KPI tiles, connection strip, and devices column
- Replace LCD-style readings with a 3×2 KPI tile grid (Fluent card surfaces, 52pt values) - Add persistent top connection strip with horizontal chips + pump name badge - Add elapsed test timer (DispatcherTimer, mm:ss) to Test Summary card - Restyle Test Summary and Active Alarms with Fluent brushes/iconography - Add Devices column (CAN / K-Line / Bench tiles) between KPI grid and test/alarms - Enumerates attached PCAN USB channels via PCAN_ATTACHED_CHANNELS API - Enumerates FTDI K-Line adapters via existing FtdiInterface helpers - Click to connect/disconnect; confirmation dialog when session active or test running - Hover tint: blue = will connect, red = will disconnect; Bench row is read-only stub - Extend ICanService with SelectedChannel + EnumerateAttachedChannels() - Expose IKwpService.ConnectedPort for active session device tracking - Add DeviceRow button style with MultiDataTrigger hover colour logic - Add 30+ new localization keys (ES + EN) for KPI labels, devices, confirmations Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -42,9 +42,6 @@ namespace HC_APTBS.ViewModels.Pages
|
||||
/// <summary>Diagnostic Trouble Code list (§3.b).</summary>
|
||||
public DtcListViewModel DtcList { get; }
|
||||
|
||||
/// <summary>Adaptation sub-section auth gate (§3.d).</summary>
|
||||
public AuthGateViewModel AdaptationAuth { get; }
|
||||
|
||||
/// <summary>DFI management (§3.d).</summary>
|
||||
public DfiManageViewModel DfiViewModel => Root.DfiViewModel;
|
||||
|
||||
@@ -82,12 +79,10 @@ namespace HC_APTBS.ViewModels.Pages
|
||||
/// <summary>Constructs the page VM and subscribes to relevant Root state changes.</summary>
|
||||
public PumpPageViewModel(
|
||||
MainViewModel root,
|
||||
DtcListViewModel dtcList,
|
||||
AuthGateViewModel adaptationAuth)
|
||||
DtcListViewModel dtcList)
|
||||
{
|
||||
Root = root;
|
||||
DtcList = dtcList;
|
||||
AdaptationAuth = adaptationAuth;
|
||||
Root = root;
|
||||
DtcList = dtcList;
|
||||
|
||||
// Initialise derived flags from the current Root state.
|
||||
RefreshDerivedFlags();
|
||||
@@ -120,11 +115,6 @@ namespace HC_APTBS.ViewModels.Pages
|
||||
IsUnlockApplicable = Root.CurrentPump != null && Root.CurrentPump.UnlockType != 0;
|
||||
OnPropertyChanged(nameof(UnlockVm));
|
||||
|
||||
// When the pump changes, re-lock the adaptation gate — a new operator
|
||||
// may be handling a different pump.
|
||||
if (AdaptationAuth.IsAuthenticated)
|
||||
AdaptationAuth.LockCommand.Execute(null);
|
||||
|
||||
// Drop any stale DTCs from the previous pump.
|
||||
DtcList.Reset();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user