From b78a4d0ca90416d37fcbaf5e54b00f7eaab53919 Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期一, 14 十月 2019 17:03:58 +0800 Subject: [PATCH] 2019-10-14-2 --- ZigbeeApp/Shared/Common/Room.cs | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-) diff --git a/ZigbeeApp/Shared/Common/Room.cs b/ZigbeeApp/Shared/Common/Room.cs old mode 100755 new mode 100644 index 282f05b..69d46f4 --- a/ZigbeeApp/Shared/Common/Room.cs +++ b/ZigbeeApp/Shared/Common/Room.cs @@ -383,20 +383,7 @@ beforeRoom.DeviceUIList.Clear(); foreach (var deviceFilePath in beforeRoom.DeviceUIFilePathList) { - var jsonInfo = Encoding.UTF8.GetString(Global.ReadFileByHomeId(deviceFilePath)); - var tempDeviceUI = Newtonsoft.Json.JsonConvert.DeserializeObject<DeviceUI>(jsonInfo); - if (tempDeviceUI != null) - { - var delCommon = tempDeviceUIList.Find((obj) => obj.CommonDevice != null && tempDeviceUI.CommonDevice != null && obj.CommonDevice.Type == tempDeviceUI.CommonDevice.Type && obj.CommonDevice.CommonDeviceAddrEpoint == tempDeviceUI.CommonDevice.CommonDeviceAddrEpoint); - if (delCommon != null) - { - beforeRoom.DeviceUIList.Add(delCommon); - } - else - { - beforeRoom.AddDevice(deviceFilePath); - } - } + beforeRoom.DeviceUIList.Add(Common.LocalDevice.Current.GetDeviceUI(deviceFilePath)); } //鍦烘櫙(SceneUI) beforeRoom.SceneUIList.Clear(); -- Gitblit v1.8.0