From 6fa9d69da922c8049f5acfcbb9ce9fd26811024c Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期四, 16 四月 2020 17:10:57 +0800
Subject: [PATCH] 请合并代码

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSelectControl.cs |   38 +++-----------------------------------
 1 files changed, 3 insertions(+), 35 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSelectControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSelectControl.cs
index 0436869..bcd071a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSelectControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSelectControl.cs
@@ -20,14 +20,6 @@
             get { return Common.LocalDevice.Current.GetDevice(MainKeys); }
         }
         /// <summary>
-        /// 鎴块棿鎺т欢
-        /// </summary>
-        private NormalViewControl btnRoom = null;
-        /// <summary>
-        /// 璁惧鎺т欢
-        /// </summary>
-        private NormalViewControl btnDevie = null;
-        /// <summary>
         /// 閫夋嫨鎺т欢
         /// </summary>
         private MostRightIconControl btnSelect = null;
@@ -95,20 +87,11 @@
 
             //璁惧
             string eName = Common.LocalDevice.Current.GetDeviceEpointName(device);
-            btnDevie = this.AddLeftCaption(eName, 850, 60);
-            btnDevie.TextSize = 15;
-            //杩欎釜鍧愭爣鏈夌偣鐗规畩
-            btnDevie.Y = Application.GetRealHeight(12) + this.chidrenYaxis;
-            this.AddChidren(btnDevie, ChidrenBindMode.BindEventOnly);
+            this.AddTopView(eName, 850);
 
             //鎴块棿
-            string roomName = Common.Room.CurrentRoom.GetRoomNameByDevice(device);
-            btnRoom = this.AddLeftCaption(roomName, 850, 50, true);
-            //杩欎釜鍧愭爣鏈夌偣鐗规畩
-            btnRoom.Y = Application.GetRealHeight(72) + this.chidrenYaxis;
-            btnRoom.TextSize = 12;
-            btnRoom.TextColor = UserCenterColor.Current.TextGrayColor1;
-            this.AddChidren(btnRoom, ChidrenBindMode.BindEventOnly);
+            string roomName = HdlRoomLogic.Current.GetRoomNameByDevice(device);
+            this.AddBottomView(roomName, 850);
 
             btnSelect = this.AddMostRightEmptyIcon(58, 58);
             btnSelect.Visible = false;
@@ -149,21 +132,6 @@
         #endregion
 
         #region 鈻� 涓�鑸柟娉昣__________________________
-
-        /// <summary>
-        /// 绉婚櫎鎴块棿鎺т欢
-        /// </summary>
-        public void RemoveRoomControl()
-        {
-            //绉婚櫎浜嬩欢
-            this.ChangedChidrenBindMode(btnRoom, ChidrenBindMode.NotBind);
-            this.btnRoom.RemoveFromParent();
-            this.btnDevie.Gravity = Gravity.CenterVertical;
-            if (chidrenYaxis != 0)
-            {
-                this.btnDevie.Y += chidrenYaxis;
-            }
-        }
 
         #endregion
     }

--
Gitblit v1.8.0