Dispenser/DispenserHal/Camera/DTO/FloatValue.cs

50 lines
945 B
C#
Raw Normal View History

2024-08-16 07:20:09 +00:00
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace DispenserHal.Camera.DTO;
public class FloatValue : INotifyPropertyChanged
{
private float _curValue;
private float _max;
private float _min;
public float CurValue
{
get => _curValue;
set
{
_curValue = value;
OnPropertyChanged();
}
}
public float Max
{
get => _max;
set
{
_max = value;
OnPropertyChanged();
}
}
public float Min
{
get => _min;
set
{
_min = value;
OnPropertyChanged();
}
}
public event PropertyChangedEventHandler? PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}