2026-04-03 20:31:15 +08:00
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
|
using System.Runtime.CompilerServices;
|
|
|
|
|
|
|
|
|
|
|
|
namespace MembranePoreTester.Models
|
2026-02-27 16:03:49 +08:00
|
|
|
|
{
|
2026-04-03 20:31:15 +08:00
|
|
|
|
// 数据点实现 INotifyPropertyChanged,保证 UI(DataGrid/Plot)在属性变化时刷新
|
|
|
|
|
|
public class DataPoint : INotifyPropertyChanged
|
2026-02-27 16:03:49 +08:00
|
|
|
|
{
|
2026-04-03 20:31:15 +08:00
|
|
|
|
private double _pressure;
|
|
|
|
|
|
private double _wetFlow;
|
|
|
|
|
|
private double _dryFlow;
|
|
|
|
|
|
|
|
|
|
|
|
public double Pressure
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _pressure;
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
if (_pressure != value)
|
|
|
|
|
|
{
|
|
|
|
|
|
_pressure = value;
|
|
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public double WetFlow
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _wetFlow;
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
if (_wetFlow != value)
|
|
|
|
|
|
{
|
|
|
|
|
|
_wetFlow = value;
|
|
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public double DryFlow
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _dryFlow;
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
if (_dryFlow != value)
|
|
|
|
|
|
{
|
|
|
|
|
|
_dryFlow = value;
|
|
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
2026-03-24 19:33:35 +08:00
|
|
|
|
|
2026-04-03 20:31:15 +08:00
|
|
|
|
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
|
|
|
|
|
{
|
|
|
|
|
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|
|
|
|
|
}
|
2026-02-27 16:03:49 +08:00
|
|
|
|
}
|
2026-04-03 20:31:15 +08:00
|
|
|
|
}
|