Commit 420c8b13 authored by 潘栩锋's avatar 潘栩锋 🚴

模拟HMI Property 整理

parent d3604d26
......@@ -19,75 +19,20 @@ namespace FLY.Simulation.Blowing
const UInt16 ADDR_D_Heats = 100;
const UInt16 ADDR_D_Currs = 300;
public UInt16 HeatUpdate
{
get {
return heatupdate;
}
set {
if (heatupdate != value)
{
heatupdate = value;
NotifyPropertyChanged("HeatUpdate");
}
}
}
public UInt16 CurrUpdate
{
get
{
return currupdate;
}
set
{
if (currupdate != value)
{
currupdate = value;
NotifyPropertyChanged("CurrUpdate");
}
}
}
public UInt16 HeatUpdate { get; set; }
public UInt16 CurrUpdate { get; set; }
bool hasElectric = false;
/// <summary>
/// 当前电流 有没?
/// </summary>
public bool HasElectricCurrent
{
get
{
return hasElectric;
}
set
{
if (hasElectric != value)
{
hasElectric = value;
NotifyPropertyChanged("HasElectricCurrent");
}
}
}
public bool HasElectricCurrent { get; set; }
bool hasfan = true;
/// <summary>
/// 风机是否启动?
/// </summary>
public bool HasFan
{
get
{
return hasfan;
}
set
{
if (hasfan != value)
{
hasfan = value;
NotifyPropertyChanged("HasFan");
}
}
}
public bool HasFan { get; set; } = true;
UInt16 heatupdate = 1;
UInt16 currupdate = 1;
......@@ -205,13 +150,7 @@ namespace FLY.Simulation.Blowing
}
SendStatue();
}
protected void NotifyPropertyChanged(string propertyname)
{
if (PropertyChanged != null)
{
PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyname));
}
}
public event PropertyChangedEventHandler PropertyChanged;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment