Commit 57d3c2ea authored by 潘栩锋's avatar 潘栩锋 🚴

修复 检测加热棒出错 bug

parent aff3b62f
...@@ -51,7 +51,7 @@ using System.Windows; ...@@ -51,7 +51,7 @@ using System.Windows;
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”: // 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.0.2.0")] [assembly: AssemblyVersion("3.0.3.0")]
[assembly: AssemblyFileVersion("3.0.2.0")] [assembly: AssemblyFileVersion("3.0.3.0")]
[assembly: Guid("18607932-ECBC-4292-A3DE-5864B7FB14DB")] [assembly: Guid("18607932-ECBC-4292-A3DE-5864B7FB14DB")]
...@@ -51,7 +51,7 @@ using System.Windows; ...@@ -51,7 +51,7 @@ using System.Windows;
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”: // 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.0.2.0")] [assembly: AssemblyVersion("3.0.3.0")]
[assembly: AssemblyFileVersion("3.0.2.0")] [assembly: AssemblyFileVersion("3.0.3.0")]
[assembly: Guid("32104657-86E9-4380-9113-606589E6D812")] [assembly: Guid("32104657-86E9-4380-9113-606589E6D812")]
...@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; ...@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// 内部版本号 // 内部版本号
// 修订号 // 修订号
// //
[assembly: AssemblyVersion("3.0.2")] [assembly: AssemblyVersion("3.0.3")]
[assembly: AssemblyFileVersion("3.0.2")] [assembly: AssemblyFileVersion("3.0.3")]
...@@ -84,11 +84,18 @@ namespace FLY.FeedbackRenZiJia.Server ...@@ -84,11 +84,18 @@ namespace FLY.FeedbackRenZiJia.Server
#endregion #endregion
#region 异常检测 #region 异常检测
private bool[] bads;
/// <summary> /// <summary>
/// 烧了的加热棒 /// 烧了的加热棒
/// </summary> /// </summary>
public bool[] Bads { get; set; } public bool[] Bads
{
get { return bads; }
set {
bads = value;
NotifyPropertyChanged("Bads");
}
}
/// <summary> /// <summary>
/// 当前风机启动中 /// 当前风机启动中
...@@ -231,8 +238,16 @@ namespace FLY.FeedbackRenZiJia.Server ...@@ -231,8 +238,16 @@ namespace FLY.FeedbackRenZiJia.Server
Misc.BindingOperations.SetBinding(this, "HasCheck", mHeatCheck, "Has"); Misc.BindingOperations.SetBinding(this, "HasCheck", mHeatCheck, "Has");
Misc.BindingOperations.SetBinding(mHeatCheck, "Enable", this, "CheckEnable", Misc.BindingOperations.BindingMode.TwoWay); Misc.BindingOperations.SetBinding(mHeatCheck, "Enable", this, "CheckEnable", Misc.BindingOperations.BindingMode.TwoWay);
Misc.BindingOperations.SetBinding(mHeatCheck, "CheckNo", this, "CheckNo"); Misc.BindingOperations.SetBinding(mHeatCheck, "CheckNo", this, "CheckNo");
Misc.BindingOperations.SetBinding(mHeatCheck, "Bads", this, "Bads"); //Misc.BindingOperations.SetBinding(mHeatCheck, "Bads", this, "Bads");
Bads = mHeatCheck.Bads;
mHeatCheck.PropertyChanged += (s, e) =>
{
if (e.PropertyName == "Bads")
{
Bads = mHeatCheck.Bads;
NotifyPropertyChanged("Bads");
}
};
mWarning = new WarningSystem(); mWarning = new WarningSystem();
} }
...@@ -326,8 +341,8 @@ namespace FLY.FeedbackRenZiJia.Server ...@@ -326,8 +341,8 @@ namespace FLY.FeedbackRenZiJia.Server
{ {
if (error_property.ContainsKey(e.PropertyName)) if (error_property.ContainsKey(e.PropertyName))
{ {
bool b = (bool)Misc.PropertiesManager.GetValue(mHeatChanged, e.PropertyName); bool b = (bool)Misc.PropertiesManager.GetValue(mHeatCheck, e.PropertyName);
ERR_STATE state = b ? ERR_STATE.ON : ERR_STATE.OFF; ERR_STATE state = b ? ERR_STATE.ON : ERR_STATE.OFF;
ERRNO errno = error_property[e.PropertyName]; ERRNO errno = error_property[e.PropertyName];
......
...@@ -503,10 +503,7 @@ namespace FLY.FeedbackRenZiJia.Server ...@@ -503,10 +503,7 @@ namespace FLY.FeedbackRenZiJia.Server
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
protected void NotifyPropertyChanged(string propertyname) protected void NotifyPropertyChanged(string propertyname)
{ {
if (PropertyChanged != null) PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyname));
{
PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyname));
}
} }
#endregion #endregion
} }
......
<?xml version="1.0"?> <?xml version="1.0"?>
<FeedbackHeatsMark xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <FeedbackHeatsMark xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<heats> <heats>
<int>48</int> <int>0</int>
<int>42</int> <int>0</int>
<int>27</int> <int>0</int>
<int>15</int> <int>0</int>
<int>6</int> <int>0</int>
<int>12</int> <int>0</int>
<int>12</int> <int>0</int>
<int>15</int> <int>0</int>
<int>9</int> <int>0</int>
<int>0</int> <int>0</int>
<int>12</int> <int>0</int>
<int>15</int> <int>0</int>
<int>18</int> <int>0</int>
<int>18</int> <int>0</int>
<int>15</int> <int>0</int>
<int>18</int> <int>35</int>
<int>27</int> <int>0</int>
<int>27</int> <int>0</int>
<int>27</int> <int>0</int>
<int>27</int> <int>0</int>
<int>33</int> <int>0</int>
<int>30</int> <int>0</int>
<int>30</int> <int>0</int>
<int>18</int> <int>0</int>
<int>12</int> <int>0</int>
<int>12</int> <int>0</int>
<int>24</int> <int>0</int>
<int>48</int> <int>0</int>
<int>57</int> <int>0</int>
<int>48</int> <int>0</int>
<int>39</int> <int>0</int>
<int>30</int> <int>0</int>
<int>30</int> <int>0</int>
<int>33</int> <int>0</int>
<int>45</int> <int>0</int>
<int>54</int> <int>0</int>
<int>51</int> <int>0</int>
<int>54</int> <int>0</int>
<int>45</int> <int>0</int>
<int>45</int> <int>0</int>
<int>48</int> <int>0</int>
<int>54</int> <int>0</int>
<int>54</int> <int>0</int>
<int>51</int> <int>0</int>
</heats> </heats>
</FeedbackHeatsMark> </FeedbackHeatsMark>
\ No newline at end of file
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