From 2ed75b8b337048e5d75e6d9ec8307633134f02fd Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 10 十月 2019 11:33:04 +0800
Subject: [PATCH] 个人中心添加楼层和创建房间,实装二级验证

---
 ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs |   98 +++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 91 insertions(+), 7 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs b/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs
index 3b2ff1a..a70a7cd 100755
--- a/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs
@@ -1,24 +1,100 @@
 锘縰sing System;
 using Shared.Common;
+using Shared.Phone.Device.CommonForm;
+
 namespace Shared.Phone.Device.Room
 {
 
     public class RoomManagement : FrameLayout
     {
-        public  Action action;
+
+        #region 鈼� 鍙橀噺____________________________
+        /// <summary>
+        /// bodyFrameLayout
+        /// </summary>
+        private FrameLayout bodyFrameLayout;
+
+        #endregion
+
+
+        public Action action;
+
+
+        public override void RemoveFromParent()
+        {
+            //鏇存柊鐣岄潰
+            action?.Invoke();
+            base.RemoveFromParent();
+        }
         /// <summary>
         /// 鎴块棿绠$悊
         /// </summary>
         public void Show()
         {
-            RoomPage();
+            AddTop();
+
+            AddBodyView();
         }
-        public override void RemoveFromParent()
+
+        #region Add____________________________________
+
+        /// <summary>
+        /// AddTop
+        /// </summary>
+        public void AddTop()
         {
-            //鏇存柊鐣岄潰
-            action();
-            base.RemoveFromParent();
+            var top = new TopFrameLayout();
+            AddChidren(top);
+            top.InitTopview();
+            top.SetTopTitle(R.MyInternationalizationString.RoomList);
+            top.backButton.MouseUpEventHandler += (sender, e) =>
+            {
+                RemoveFromParent();
+            };
+
+            var addRoomItemBtn = new Device.CommonForm.SelectedStatuButton()
+            {
+                X = Application.GetRealWidth(1080 - 150),
+                Width = Application.GetMinRealAverage(100),
+                Height = Application.GetMinRealAverage(100),
+                Gravity = Gravity.CenterVertical,
+                UnSelectedImagePath = "Item/Add.png",
+                SelectedImagePath = "Item/AddSelected.png"
+            };
+            top.AddChidren(addRoomItemBtn);
+
+            addRoomItemBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                var addRoom = new AddRoom();
+                UserView.HomePage.Instance.AddChidren(addRoom);
+                UserView.HomePage.Instance.PageIndex += 1;
+                addRoom.action = () =>
+                {
+                    Show();
+                };
+                AddRoom.OldBackgroundImagePath = string.Empty;
+                addRoom.Show("");
+            };
         }
+
+        /// <summary>
+        /// AddBodyView
+        /// </summary>
+        public void AddBodyView()
+        {
+            RemoveAll();
+            bodyFrameLayout = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(184),
+                Height = Application.GetRealHeight(1737),
+                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor,
+            };
+            AddChidren(bodyFrameLayout);
+
+        }
+
+        #endregion
+
         /// <summary>
         /// 鎴块棿绠$悊鐣岄潰
         /// </summary>
@@ -163,9 +239,15 @@
 
                 var delBtn = new Shared.Phone.Device.CommonForm.RowLayoutDeleteButton();
                 //绗竴涓槸鎴块棿鍠滅埍锛屼笉鍏佽婊戝姩鍒犻櫎  鍒嗕韩杩囨潵鐨勪篃涓嶅厑璁稿垹闄�
-                if (!room.IsLove || !room.IsSharedRoom){
+                if (room.IsLove || room.IsSharedRoom)
+                {
+
+                }
+                else
+                {
                     roomRowView.AddRightView(delBtn);
                 }
+
                 //鍒犻櫎浣忓畢
                 delBtn.MouseUpEventHandler += (sender, e) =>
                 {
@@ -203,6 +285,8 @@
                 };
 
             }
+
+
         }
     }
 }
\ No newline at end of file

--
Gitblit v1.8.0