新增页面修改页面样式

This commit is contained in:
2026-05-14 15:22:17 +08:00
parent 45c5d2e27d
commit d3d22cc162
5 changed files with 559 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ using System.Windows;
using System.Windows.Threading;
using TabletTester2025.Models;
using TabletTester2025.Services;
using .Views;
namespace TabletTester2025.ViewModels
{
@@ -32,6 +33,7 @@ namespace TabletTester2025.ViewModels
public IAsyncRelayCommand OpenSettingsCommand { get; }
public IAsyncRelayCommand OpenHistoryCommand { get; }
public IAsyncRelayCommand OpenCalibrationCommand { get; }
public IAsyncRelayCommand ShowDataCommand { get; }
public MainViewModel(IPlcService plc, DatabaseService db, ExcelExportService excel, AlarmService alarm, PlcConfiguration plcConfig)
{
@@ -61,6 +63,9 @@ namespace TabletTester2025.ViewModels
OpenSettingsCommand = new AsyncRelayCommand(() => { new SettingsWindow().ShowDialog(); return Task.CompletedTask; });
OpenHistoryCommand = new AsyncRelayCommand(() => { new HistoryWindow().ShowDialog(); return Task.CompletedTask; });
OpenCalibrationCommand = new AsyncRelayCommand(() => { MessageBox.Show("校准功能待实现"); return Task.CompletedTask; });
// 跳转到 PlcDataPage 页面
ShowDataCommand = new AsyncRelayCommand(() => { new ShowData().ShowDialog(); return Task.CompletedTask; });
}
private async Task ConnectToPlc()