From 07466c19110693e3e439a7d7c8ad0bc21d9b3287 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期三, 29 四月 2020 09:14:01 +0800 Subject: [PATCH] 优化代码,更改门锁需求接口 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs index 7da740e..561b5b3 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs @@ -8,7 +8,7 @@ /// <summary> /// 璁惧淇℃伅鐣岄潰鐨勮澶囧浘鏍囨帶浠�(鍏煎缃戝叧) /// </summary> - public class DeviceInfoIconControl : FrameLayoutControl + public class DeviceInfoIconControl : FrameLayoutStatuControl { #region 鈻� 鍙橀噺澹版槑___________________________ @@ -39,10 +39,10 @@ public DeviceInfoIconControl() { //绗竴灞傚簳鑹� - this.Height = Application.GetMinRealAverage(207); - this.Width = Application.GetMinRealAverage(207); + this.Height = this.GetPictrueRealSize(207); + this.Width = this.GetPictrueRealSize(207); this.BackgroundColor = UserCenterColor.Current.White; - this.Radius = (uint)Application.GetMinRealAverage(207) / 2; + this.Radius = (uint)this.GetPictrueRealSize(207) / 2; this.UseClickStatu = false; } @@ -54,7 +54,7 @@ { this.deviceMac = i_device.DeviceAddr; //闃叉鍑虹幇璇樊 - int iconWidth = Application.GetMinRealAverage(207) - Application.GetMinRealAverage(12) - Application.GetMinRealAverage(12); + int iconWidth = this.GetPictrueRealSize(207) - this.GetPictrueRealSize(12) - this.GetPictrueRealSize(12); //绗簩灞傚簳鑹� var btnIcon2 = new NormalViewControl(iconWidth, iconWidth, false); btnIcon2.BackgroundColor = 0xfffef1ed; @@ -69,7 +69,7 @@ //瀵瑰簲鍗曠函鍙湁200鍥炶矾鐨勮澶� listDevice.Add(Common.LocalDevice.Current.GetOTADevice(deviceMac)); } - btnIcon = new NormalViewControl(Application.GetMinRealAverage(121), Application.GetMinRealAverage(121), false); + btnIcon = new NormalViewControl(this.GetPictrueRealSize(121), this.GetPictrueRealSize(121), false); btnIcon.Gravity = Gravity.Center; Common.LocalDevice.Current.SetDeviceObjectIconToControl(btnIcon, listDevice); this.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly); @@ -84,7 +84,7 @@ this.deviceMac = deviceMacAddr; this.deviceEpoint = epoint; //闃叉鍑虹幇璇樊 - int iconWidth = Application.GetMinRealAverage(207) - Application.GetMinRealAverage(12) - Application.GetMinRealAverage(12); + int iconWidth = this.GetPictrueRealSize(207) - this.GetPictrueRealSize(12) - this.GetPictrueRealSize(12); //绗簩灞傚簳鑹� var btnIcon2 = new NormalViewControl(iconWidth, iconWidth, false); btnIcon2.BackgroundColor = 0xfffef1ed; @@ -93,7 +93,7 @@ this.AddChidren(btnIcon2, ChidrenBindMode.BindEventOnly); //璁惧鍥炬爣 - btnIcon = new NormalViewControl(Application.GetMinRealAverage(121), Application.GetMinRealAverage(121), false); + btnIcon = new NormalViewControl(this.GetPictrueRealSize(121), this.GetPictrueRealSize(121), false); btnIcon.Gravity = Gravity.Center; Common.LocalDevice.Current.SetDeviceIconToControl(btnIcon, Common.LocalDevice.Current.GetDevice(deviceMacAddr, epoint)); this.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly); @@ -107,7 +107,7 @@ { this.zbGateway = i_gateway; //闃叉鍑虹幇璇樊 - int iconWidth = Application.GetMinRealAverage(207) - Application.GetMinRealAverage(12) - Application.GetMinRealAverage(12); + int iconWidth = this.GetPictrueRealSize(207) - this.GetPictrueRealSize(12) - this.GetPictrueRealSize(12); //绗簩灞傚簳鑹� var btnIcon2 = new NormalViewControl(iconWidth, iconWidth, false); btnIcon2.BackgroundColor = 0xfffef1ed; @@ -116,7 +116,7 @@ this.AddChidren(btnIcon2, ChidrenBindMode.BindEventOnly); //璁惧鍥炬爣 - btnIcon = new NormalViewControl(Application.GetMinRealAverage(121), Application.GetMinRealAverage(121), false); + btnIcon = new NormalViewControl(this.GetPictrueRealSize(121), this.GetPictrueRealSize(121), false); btnIcon.Gravity = Gravity.Center; HdlGatewayLogic.Current.SetGatewayIcon(btnIcon, i_gateway); this.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly); -- Gitblit v1.8.0