Commit e09e6b33 authored by health's avatar health

isError in RecordCollection is alway false

parent 2dfdea56
......@@ -104,7 +104,20 @@ namespace WSDDBBrowser.Core
/// <summary>
/// 超过限制了
/// </summary>
public bool IsError { get; set; }
public bool IsError
{
get {
if (Average > ToleranceMax)
return true;
else if (Average < ToleranceMin)
{
return true;
}
else {
return false;
}
}
}
public object Mapper { get; private set; }
public Func<double, string> XFormatter { get; set; }
......
......@@ -105,7 +105,7 @@ namespace WSDDBBrowser
};
RecordCollections = new List<RecordCollection>() {
new RecordCollection(){ DeviceID = "101", DeviceName = "温度1", Target=100, Tolerance=2, Average = 100.1, Min=99, Max = 101, Sigma3 = 1, IsError = false }
new RecordCollection(){ DeviceID = "101", DeviceName = "温度1", Target=100, Tolerance=2, Average = 100.1, Min=99, Max = 101, Sigma3 = 1 }
};
}
}
......
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