feat: 重构项目结构,添加 WPF 应用
- 将核心功能提取到 WCTDataMiner.Core 类库 - 添加 WCTDataMiner.Wpf 桌面应用 - 支持数据解析、导出、统计等功能 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
49
src/WCTDataMiner.Wpf/ViewModels/QfodChartViewModel.cs
Normal file
49
src/WCTDataMiner.Wpf/ViewModels/QfodChartViewModel.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using LiveChartsCore;
|
||||
using LiveChartsCore.SkiaSharpView;
|
||||
|
||||
namespace WCTDataMiner.Wpf.ViewModels;
|
||||
|
||||
/// <summary>
|
||||
/// Qfod 折线图 ViewModel
|
||||
/// </summary>
|
||||
public partial class QfodChartViewModel : ObservableObject
|
||||
{
|
||||
[ObservableProperty]
|
||||
private int _scenarioId;
|
||||
|
||||
[ObservableProperty]
|
||||
private ISeries[] _series;
|
||||
|
||||
[ObservableProperty]
|
||||
private Axis[] _xAxes;
|
||||
|
||||
[ObservableProperty]
|
||||
private Axis[] _yAxes;
|
||||
|
||||
public QfodChartViewModel()
|
||||
{
|
||||
// 初始化图表配置
|
||||
Series = Array.Empty<ISeries>();
|
||||
XAxes = new Axis[] { new Axis { Name = "Coil Index" } };
|
||||
YAxes = new Axis[] { new Axis { Name = "Q Value" } };
|
||||
}
|
||||
|
||||
public async Task LoadDataAsync()
|
||||
{
|
||||
// TODO: 从数据库加载 Qfod 数据并构建图表
|
||||
Series = new ISeries[]
|
||||
{
|
||||
new LineSeries<double>
|
||||
{
|
||||
Name = "DeltaQ",
|
||||
Values = new double[] { 25, 30, 28 }
|
||||
},
|
||||
new LineSeries<double>
|
||||
{
|
||||
Name = "CurrentQ",
|
||||
Values = new double[] { 45.5, 50.2, 48.8 }
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user