feat: redesign Pump page with Fluent card layout, bottom snackbar, and RPM chart
- Replace sub-nav + HiddenTabsTabControl with 3-column Fluent card layout: PumpCommandsCard (vertical ME/FBKW/PreIn sliders) + DfiCalibrationCard / PumpLiveDataCard (KPI tiles + RPM rolling chart + redesigned status bytes) / PumpIdentificationCard + DtcCard - Add PumpTopStripView: pump selector, model badge, CAN + K-Line chips - Move immobilizer unlock to MainWindow bottom snackbar (UnlockSnackbarView): auto-close on success after 3 s, persist on failure with manual Dismiss - Redesign StatusDisplayView to 2×8 rounded 28px tiles with bit index + tooltip - Add NullToVisibilityConverter; add SnackbarShell, PumpCard, and related styles - Delete obsolete views: UnlockProgressDialog, UnlockPanelView, PumpIdentificationPanelView, PumpLiveDataView, DfiManageView, DtcListView, PumpControlView - PumpPageViewModel: remove PumpSubPage enum, add RpmChart wired to Root.PumpRpm Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using HC_APTBS.Models;
|
||||
|
||||
@@ -64,6 +65,9 @@ namespace HC_APTBS.ViewModels
|
||||
/// <summary>16 bit indicators for bits 0–15 of the current status word.</summary>
|
||||
public ObservableCollection<BitIndicatorViewModel> Bits { get; } = new();
|
||||
|
||||
/// <summary>Number of bits currently active (set to 1) in the status word.</summary>
|
||||
public int ActiveCount => Bits.Count(b => b.IsActive);
|
||||
|
||||
/// <summary>
|
||||
/// Fired when a bit that is flagged as an error transitions to active.
|
||||
/// The argument is the bit position (0-based).
|
||||
@@ -119,6 +123,8 @@ namespace HC_APTBS.ViewModels
|
||||
if (isSet && statusBit.Enabled)
|
||||
ErrorBitDetected?.Invoke(index);
|
||||
}
|
||||
|
||||
OnPropertyChanged(nameof(ActiveCount));
|
||||
}
|
||||
|
||||
/// <summary>Resets all indicators to the default green / inactive state.</summary>
|
||||
@@ -130,6 +136,8 @@ namespace HC_APTBS.ViewModels
|
||||
Bits[i].Color = "#26C200";
|
||||
Bits[i].Description = $"Bit {i}";
|
||||
}
|
||||
|
||||
OnPropertyChanged(nameof(ActiveCount));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user