From 23532fa8ad34c89b6d24b01eaef6475fd0aad898 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期三, 15 四月 2020 18:08:24 +0800
Subject: [PATCH] ???????

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs |   59 +++++++++++++++--------------------------------------------
 1 files changed, 15 insertions(+), 44 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
index 4c2bb2d..cdbc6d0 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
@@ -1,26 +1,14 @@
 锘縰sing System;
 using System.Collections.Generic;
 using Shared.Common;
-using Shared.Phone.Device.Light;
 using Shared.Phone.UserCenter.Device;
 using ZigBee.Device;
 using static ZigBee.Device.BindObj;
 using static ZigBee.Device.Panel;
 namespace Shared.Phone.UserCenter.DeviceBind
 {
-    public class AddDevicePage : BindCommonLayout, ZigBee.Common.IStatus
+    public class AddDevicePage : BindCommonLayout
     {
-        /// <summary>
-        /// 鎸夐敭妯″紡鎺ユ敹
-        /// </summary>
-        /// <param name="common">Common.</param>
-        public void Changed(CommonDevice common)
-        {
-            Shared.Application.RunOnMainThread(() =>
-            {
-            });
-        }
-
         /// 鏋勯�犲嚱鏁�
         /// </summary>
         /// <param name="doorLock"></param>
@@ -139,8 +127,8 @@
 
             var btnBindDown = new Button
             {
-                Height = Application.GetRealHeight(69),
-                Width = Application.GetRealWidth(69),
+                Height = Application.GetMinReal(69),
+                Width = Application.GetMinReal(69),
                 X = Application.GetRealWidth(200 - 77),
                 UnSelectedImagePath = "BindPic/BindDown.png",
                 Gravity = Gravity.CenterVertical,
@@ -365,8 +353,8 @@
 
                 var btnRoomFrameLayout = new FrameLayout
                 {
-                    Height = Application.GetRealHeight(159),
-                    Width = Application.GetRealWidth(255),
+                    Height = Application.GetMinReal(159),
+                    Width = Application.GetMinReal(255),
                     Y = Application.GetRealHeight(23),
                     X = Application.GetRealWidth(5),
                     BackgroundImagePath = "Item/RoomIconBackground.png",
@@ -541,7 +529,7 @@
         }
 
         /// <summary>
-        /// 鎸夐敭缁戝畾鍦烘櫙琛ㄦ樉绀�
+        /// 鎸夐敭缁戝畾鐩爣琛ㄦ樉绀�
         /// </summary>
         /// <param name="gateway">Gateway.</param>
         /// <param name="key">Key.</param>
@@ -629,21 +617,24 @@
                     TextColor = Shared.Common.ZigbeeColor.Current.TextBlack,
                     TextAlignment = TextAlignment.CenterLeft,
                     Tag = device.DeviceEpointName,
+                    Text = Common.LocalDevice.Current.GetDeviceEpointName(device),
                     TextSize = 15,
                 };
                 rowLayout.AddChidren(btnBindName);
 
                 var btnChoose = new Button()
                 {
-                    Width = Application.GetRealWidth(60),
-                    Height = Application.GetRealHeight(60),
+                    Width = Application.GetMinReal(60),
+                    Height = Application.GetMinReal(60),
                     X = Application.GetRealWidth(861 + 81),
                     Y = Application.GetRealHeight(35),
                     SelectedImagePath = "DoorLock/SelectedIcon.png",
                     TextColor = Shared.Common.ZigbeeColor.Current.XMWhite,
                     Visible = false,
                     Tag = device.DeviceEpointName,
+                    Gravity = Gravity.CenterVertical,
                 };
+
                 rowLayout.AddChidren(btnChoose);
 
                 var line2 = new Button()
@@ -701,14 +692,6 @@
                 btnBindName.MouseUpEventHandler += hander;
                 btnChoose.MouseUpEventHandler += hander;
 
-                if (string.IsNullOrEmpty(device.DeviceEpointName))
-                {
-                    btnBindName.Text = device.DeviceAddr + "_" + device.DeviceEpoint;
-                }
-                else
-                {
-                    btnBindName.Text = device.DeviceEpointName;
-                }
                 foreach (var bindedDev in targetList)
                 {
                     var id = device.DeviceAddr + device.DeviceEpoint;
@@ -750,8 +733,8 @@
 
             var sidelipFrameLayout = new FrameLayout()
             {
-                Height = Application.GetRealHeight(783),
-                Width = Application.GetRealWidth(449),
+                Height = Application.GetMinReal(783),
+                Width = Application.GetMinReal(449),
                 Y = Application.GetRealHeight(161),
                 X = Application.GetRealWidth(596),
                 BackgroundImagePath = "DoorLock/SideslipPic.png",
@@ -793,8 +776,8 @@
 
                 var btnAllMethod = new Button()
                 {
-                    Width = Application.GetRealWidth(81),
-                    Height = Application.GetRealHeight(81),
+                    Width = Application.GetMinReal(81),
+                    Height = Application.GetMinReal(81),
                     Y = Application.GetRealHeight(55),
                     UnSelectedImagePath = "Floor/Floor.png",
                     SelectedImagePath = "Floor/FloorSelected.png",
@@ -877,18 +860,6 @@
                 rowFrameLayout.MouseUpEventHandler += hander;
                 btnMethodText.MouseUpEventHandler += hander;
             }
-        }
-
-        public void DeviceInfoChange(CommonDevice common, string typeTag)
-        {
-        }
-
-        public void ChangedILogicStatus(ZigBee.Device.Logic logic)
-        {
-        }
-
-        public void ChangedISceneStatus(Scene scene)
-        {
         }
     }
 }

--
Gitblit v1.8.0