From 4b378188ce972df432b23d9cb73babb6cc0679c6 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期五, 17 一月 2020 14:56:15 +0800 Subject: [PATCH] 合并代码 ver.10086 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs index 1352422..91b3a36 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs @@ -56,9 +56,15 @@ this.AddChidren(btnIcon2); //璁惧鍥炬爣 + var listDevice = Common.LocalDevice.Current.GetDevicesByMac(deviceMac); + if (listDevice.Count == 0) + { + //瀵瑰簲鍗曠函鍙湁200鍥炶矾鐨勮澶� + listDevice.Add(Common.LocalDevice.Current.GetOTADevice(deviceMac)); + } btnIcon = new NormalViewControl(Application.GetMinRealAverage(121), Application.GetMinRealAverage(121), false); btnIcon.Gravity = Gravity.Center; - Common.LocalDevice.Current.SetDeviceObjectIconToControl(btnIcon, Common.LocalDevice.Current.GetDevicesByMac(deviceMac)); + Common.LocalDevice.Current.SetDeviceObjectIconToControl(btnIcon, listDevice); this.AddChidren(btnIcon); } @@ -95,7 +101,13 @@ if (this.deviceMac != null) { //鍒锋柊鍥炬爣 - Common.LocalDevice.Current.SetDeviceObjectIconToControl(btnIcon, Common.LocalDevice.Current.GetDevicesByMac(deviceMac)); + var listDevice = Common.LocalDevice.Current.GetDevicesByMac(deviceMac); + if (listDevice.Count == 0) + { + //瀵瑰簲鍗曠函鍙湁200鍥炶矾鐨勮澶� + listDevice.Add(Common.LocalDevice.Current.GetOTADevice(deviceMac)); + } + Common.LocalDevice.Current.SetDeviceObjectIconToControl(btnIcon, listDevice); } else { -- Gitblit v1.8.0