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

模拟HMI Property 整理

parent d3604d26
...@@ -19,75 +19,20 @@ namespace FLY.Simulation.Blowing ...@@ -19,75 +19,20 @@ namespace FLY.Simulation.Blowing
const UInt16 ADDR_D_Heats = 100; const UInt16 ADDR_D_Heats = 100;
const UInt16 ADDR_D_Currs = 300; const UInt16 ADDR_D_Currs = 300;
public UInt16 HeatUpdate public UInt16 HeatUpdate { get; set; }
{
get { public UInt16 CurrUpdate { get; set; }
return heatupdate;
}
set {
if (heatupdate != value)
{
heatupdate = value;
NotifyPropertyChanged("HeatUpdate");
}
}
}
public UInt16 CurrUpdate
{
get
{
return currupdate;
}
set
{
if (currupdate != value)
{
currupdate = value;
NotifyPropertyChanged("CurrUpdate");
}
}
}
bool hasElectric = false;
/// <summary> /// <summary>
/// 当前电流 有没? /// 当前电流 有没?
/// </summary> /// </summary>
public bool HasElectricCurrent public bool HasElectricCurrent { get; set; }
{
get
{
return hasElectric;
}
set
{
if (hasElectric != value)
{
hasElectric = value;
NotifyPropertyChanged("HasElectricCurrent");
}
}
}
bool hasfan = true;
/// <summary> /// <summary>
/// 风机是否启动? /// 风机是否启动?
/// </summary> /// </summary>
public bool HasFan public bool HasFan { get; set; } = true;
{
get
{
return hasfan;
}
set
{
if (hasfan != value)
{
hasfan = value;
NotifyPropertyChanged("HasFan");
}
}
}
UInt16 heatupdate = 1; UInt16 heatupdate = 1;
UInt16 currupdate = 1; UInt16 currupdate = 1;
...@@ -205,13 +150,7 @@ namespace FLY.Simulation.Blowing ...@@ -205,13 +150,7 @@ namespace FLY.Simulation.Blowing
} }
SendStatue(); SendStatue();
} }
protected void NotifyPropertyChanged(string propertyname)
{
if (PropertyChanged != null)
{
PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyname));
}
}
public event PropertyChangedEventHandler PropertyChanged; 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