Commit e3a046aa authored by 潘栩锋's avatar 潘栩锋 🚴

修复 gageinfo 异常

parent 4fe9dfa2
...@@ -88,7 +88,10 @@ namespace FLY.Thick.Base.UI ...@@ -88,7 +88,10 @@ namespace FLY.Thick.Base.UI
var reponse = retData as GetGageInfoResponse; var reponse = retData as GetGageInfoResponse;
int index = (int)asyncContext; int index = (int)asyncContext;
SeriesInfos[index].Datas.Clear(); SeriesInfos[index].Datas.Clear();
SeriesInfos[index].Datas.AddRange(reponse.Data); if (reponse.Data != null)
{
SeriesInfos[index].Datas.AddRange(reponse.Data);
}
SeriesInfos[index].UpdateTime = reponse.UpdateTime; SeriesInfos[index].UpdateTime = reponse.UpdateTime;
DataBindAll(); DataBindAll();
...@@ -159,7 +162,10 @@ namespace FLY.Thick.Base.UI ...@@ -159,7 +162,10 @@ namespace FLY.Thick.Base.UI
var reponse = retData as GetGageInfoResponse; var reponse = retData as GetGageInfoResponse;
int index = (int)asyncContext; int index = (int)asyncContext;
SeriesInfos[index].Datas.Clear(); SeriesInfos[index].Datas.Clear();
SeriesInfos[index].Datas.AddRange(reponse.Data); if (reponse.Data != null)
{
SeriesInfos[index].Datas.AddRange(reponse.Data);
}
SeriesInfos[index].UpdateTime = reponse.UpdateTime; SeriesInfos[index].UpdateTime = reponse.UpdateTime;
DataBindAll(); DataBindAll();
......
...@@ -81,6 +81,7 @@ namespace FLY.Thick.Base.Server ...@@ -81,6 +81,7 @@ namespace FLY.Thick.Base.Server
scanMotion.EndEvent += GM_GageInfo_EndEvent; scanMotion.EndEvent += GM_GageInfo_EndEvent;
scanMotion.PropertyChanged += GM_GageInfo_PropertyChanged; scanMotion.PropertyChanged += GM_GageInfo_PropertyChanged;
UpdateTimes = new DateTime[2];
updateDataOK(); updateDataOK();
initParam.PropertyChanged += new PropertyChangedEventHandler(initParam_PropertyChanged); initParam.PropertyChanged += new PropertyChangedEventHandler(initParam_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