From 7df40c4d000b5424bc11d4a6b9c3332dfe661c67 Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期二, 24 三月 2020 10:22:43 +0800
Subject: [PATCH] 2020-03-24-1
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs | 22 +++++++++++++++++-----
1 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs
index c93d200..91b3a36 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs
@@ -38,7 +38,7 @@
this.Height = Application.GetMinRealAverage(207);
this.Width = Application.GetMinRealAverage(207);
this.BackgroundColor = UserCenterColor.Current.White;
- this.Radius = (uint)Application.GetMinRealAverage(207);
+ this.Radius = (uint)Application.GetMinRealAverage(207) / 2;
}
/// <summary>
@@ -51,14 +51,20 @@
//绗簩灞傚簳鑹�
var btnIcon2 = new NormalViewControl(Application.GetMinRealAverage(184), Application.GetMinRealAverage(184), false);
btnIcon2.BackgroundColor = 0xfffef1ed;
- btnIcon2.Radius = (uint)Application.GetMinRealAverage(184);
+ btnIcon2.Radius = (uint)Application.GetMinRealAverage(184) / 2;
btnIcon2.Gravity = Gravity.Center;
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.SetDeviceBeloneIconToControl(btnIcon, Common.LocalDevice.Current.GetDevicesByMac(deviceMac));
+ Common.LocalDevice.Current.SetDeviceObjectIconToControl(btnIcon, listDevice);
this.AddChidren(btnIcon);
}
@@ -72,7 +78,7 @@
//绗簩灞傚簳鑹�
var btnIcon2 = new NormalViewControl(Application.GetMinRealAverage(184), Application.GetMinRealAverage(184), false);
btnIcon2.BackgroundColor = 0xfffef1ed;
- btnIcon2.Radius = (uint)Application.GetMinRealAverage(184);
+ btnIcon2.Radius = (uint)Application.GetMinRealAverage(184) / 2;
btnIcon2.Gravity = Gravity.Center;
this.AddChidren(btnIcon2);
@@ -95,7 +101,13 @@
if (this.deviceMac != null)
{
//鍒锋柊鍥炬爣
- Common.LocalDevice.Current.SetDeviceBeloneIconToControl(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