- 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>
25 lines
617 B
C#
25 lines
617 B
C#
using System.ComponentModel;
|
|
using System.Windows;
|
|
using HC_APTBS.ViewModels;
|
|
using Wpf.Ui.Controls;
|
|
|
|
namespace HC_APTBS;
|
|
|
|
/// <summary>
|
|
/// Code-behind for MainWindow — minimal: sets DataContext and forwards the
|
|
/// Closing event to a ViewModel command if needed.
|
|
/// </summary>
|
|
public partial class MainWindow : FluentWindow
|
|
{
|
|
public MainWindow(MainViewModel viewModel)
|
|
{
|
|
InitializeComponent();
|
|
DataContext = viewModel;
|
|
}
|
|
|
|
private void OnWindowClosing(object sender, CancelEventArgs e)
|
|
{
|
|
// Allow the window to close; services are disposed by the DI container.
|
|
}
|
|
}
|