This commit is contained in:
@@ -1,10 +1,59 @@
|
||||
namespace MembranePoreTester.Models
|
||||
{
|
||||
public class DataPoint
|
||||
{
|
||||
public double Pressure { get; set; } // 压力
|
||||
public double WetFlow { get; set; } // 湿膜流量(L/min)
|
||||
public double DryFlow { get; set; } // 干膜流量(L/min)
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace MembranePoreTester.Models
|
||||
{
|
||||
// 数据点实现 INotifyPropertyChanged,保证 UI(DataGrid/Plot)在属性变化时刷新
|
||||
public class DataPoint : INotifyPropertyChanged
|
||||
{
|
||||
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;
|
||||
|
||||
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user