Files
2026-04-03 20:31:15 +08:00

60 lines
1.4 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace MembranePoreTester.Models
{
// 数据点实现 INotifyPropertyChanged保证 UIDataGrid/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));
}
}
}