From 31e484e5d3e42e825e43ef9d1707c1adc02a4e1c Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期五, 18 十二月 2020 19:57:34 +0800 Subject: [PATCH] 完成 dali 的 UI --- HDL_ON/DAL/Mqtt/MqttClient.cs | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs old mode 100644 new mode 100755 index 77f4d6b..4ddfc8e --- a/HDL_ON/DAL/Mqtt/MqttClient.cs +++ b/HDL_ON/DAL/Mqtt/MqttClient.cs @@ -289,7 +289,7 @@ { //A鍗忚鏁版嵁澶勭悊 var revString = Encoding.UTF8.GetString(bytes); - Control.Ins.UpdataFunctionStatus(revString); + Control.Ins.UpdataFunctionStatus(revString,null); } } } @@ -310,11 +310,27 @@ if (RemoteMqttClient.ConnectedHandler == null) { RemoteMqttClient.UseConnectedHandler(async (e) => { - Control.Ins.GatewayOnline = true; + if (DB_ResidenceData.Instance.HomeGateway.gatewayStatus) + { + Control.Ins.GatewayOnline = true; + } + else + { + //new System.Threading.Thread(() => { + // while(true) + // { + // System.Threading.Thread.Sleep(1000); + // if (DB_ResidenceData.Instance.HomeGateway.GatewayOnline) + // { + // Control.Ins.GatewayOnline = true; + // break; + // } + // } + //}) { IsBackground = true }.Start(); + } IfNeedReadAllDeviceStatus = true; Utlis.WriteLine($"============>Mqtt杩滅▼杩炴帴鎴愬姛"); SendPushSignOut(); - //FunctionList.List.ReadAllFunctionStatus(); }); } #endregion -- Gitblit v1.8.0