From 5428935270159bfc42c2934ed7fb1091554fc9a4 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 09 七月 2020 17:12:42 +0800 Subject: [PATCH] 修改了 sokect --- ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs index 88f393c..419cc54 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs @@ -166,8 +166,12 @@ { continue; } - var sceneUi = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.SceneUI>(System.Text.Encoding.UTF8.GetString(byteData)); - listScene.Add(sceneUi); + try + { + var sceneUi = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.SceneUI>(System.Text.Encoding.UTF8.GetString(byteData)); + listScene.Add(sceneUi); + } + catch { } } if (listScene.Count == 0) { @@ -449,11 +453,15 @@ } //浠庡垎浜枃浠朵腑搴忓垪鍖栧洖鏉� var deviceData = HdlShardLogic.Current.GetShardFileContent(deviceFile); - var device = ZigBee.Device.CommonDevice.CommonDeviceByByteString(strArry[1], System.Text.Encoding.UTF8.GetString(deviceData)); - if (device != null) + try { - listDevice.Add(device); + var device = ZigBee.Device.CommonDevice.CommonDeviceByByteString(strArry[1], System.Text.Encoding.UTF8.GetString(deviceData)); + if (device != null) + { + listDevice.Add(device); + } } + catch { } } } return listDevice; -- Gitblit v1.8.0