From 82a773d1783549caca563831aac8affc059deedf Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 07 十一月 2019 10:56:13 +0800 Subject: [PATCH] 合并了全部的代码,IOS 图片需要从新引入工程 --- ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs | 25 ++++++++++++++++++++++++- 1 files changed, 24 insertions(+), 1 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs b/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs index ae5cd7d..965a4d8 100755 --- a/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs +++ b/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs @@ -145,7 +145,30 @@ } else if (typeTag == "OnlineStatusChange") { - + Application.RunOnMainThread(() => + { + try + { + var deviceUI = device; + //璁惧涓虹┖ + if (deviceUI.CommonDevice == null) + { + return; + } + //鏄惁涓哄綋鍓嶈澶� + if (deviceUI.CommonDevice.DeviceEpoint != common.DeviceEpoint || deviceUI.CommonDevice.DeviceAddr != common.DeviceAddr) + { + return; + } + deviceUI.CommonDevice.IsOnline = common.IsOnline; + deviceIMG.IsSelected = switchBtn.IsSelected = deviceUI.CommonDevice.IsOnline == 1; + deviceUI.CommonDevice.LastDateTime = DateTime.Now; + } + catch (Exception ex) + { + System.Console.WriteLine($"Error:{ex.Message}"); + } + }); } } #endregion -- Gitblit v1.8.0