From 6c083de3930e4e3358925d980257363882b79090 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 12 七月 2023 22:56:31 +0800 Subject: [PATCH] 状态刷新优化,后台回到前台重新读取数据 --- HDL_ON/DAL/DriverLayer/Control.cs | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs index ce113f2..a6dcaa1 100644 --- a/HDL_ON/DAL/DriverLayer/Control.cs +++ b/HDL_ON/DAL/DriverLayer/Control.cs @@ -124,6 +124,10 @@ HomePage.LoadEvent_CheckLinkStatus(); } } + else + { + MainPage.Log($"鐘舵�佷竴鑷达紝涓嶆洿鏂版暟鎹�(鏈湴)"); + } } } bool _GatewayOnline_Cloud = false; @@ -179,6 +183,10 @@ //淇敼涓婚〉杩炴帴鐘舵�� HomePage.LoadEvent_CheckLinkStatus(); } + } + else + { + MainPage.Log($"鐘舵�佷竴鑷达紝涓嶆洿鏂版暟鎹�(浜戠)"); } }catch(Exception ex) { @@ -516,6 +524,7 @@ var sendBytes = Ins.ConvertSendBodyData(CommunicationTopic.ct.ControlFunctionTopic, functionControlDataJson); new Control_Udp().SendLocalHdlLinkData(sendBytes, functionControlDataObj.id, resend); MainPage.Log($"鏈湴閫氳 鍙戦�丠DL-Link鏁版嵁:{functionControlDataJson}"); + Ins.myTcpClient.SendMessage(sendBytes); } } //杩滅▼閫氳 @@ -940,6 +949,10 @@ /// <returns></returns> public void ConvertReceiveData(byte[] receiveBytes, string ip) { + if (!UserInfo.Current.IsLogin) + { + return; + } var reString = Encoding.UTF8.GetString(receiveBytes); AnalysisReceiveData(reString, receiveBytes, ip); } @@ -951,6 +964,7 @@ /// <returns></returns> public LocalCommunicationData AnalysisReceiveData(string receiveString, byte[] originalReceiveBytes, string sIp = null) { + LocalCommunicationData receiveObj = new LocalCommunicationData(); -- Gitblit v1.8.0