From 9a4b76398009cf76c508d61f7e48fb6f5cb7ac2d Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期二, 21 七月 2020 09:46:53 +0800
Subject: [PATCH] 请合并最新多功能面板代码

---
 ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs |   35 ++++++++++++++++++++++++-----------
 1 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs b/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs
index f97e4f8..520287b 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs
@@ -16,13 +16,17 @@
         #region 鈻� 鍙橀噺澹版槑___________________________
 
         /// <summary>
+        /// 鐣岄潰鍏抽棴浜嬩欢
+        /// </summary>
+        public Action FormCloseEvent = null;
+        /// <summary>
         /// 娣诲姞鍒� 鐨勮儗鏅浘鎺т欢
         /// </summary>
         private FrameLayoutStatuControl frameAddBackGroud = null;
         /// <summary>
         /// 鍔熻兘鐨勬甯冩帶浠�
         /// </summary>
-        private FrameLayout DeviceBodyTableControl = null;
+        private NormalFrameLayout DeviceBodyTableControl = null;
         /// <summary>
         /// 鍦烘櫙鐨勫垪琛ㄦ帶浠�
         /// </summary>
@@ -34,7 +38,7 @@
         /// <summary>
         /// 鍦烘櫙鐨勬甯冩帶浠�
         /// </summary>
-        private FrameLayout SceneBodyTableControl = null;
+        private NormalFrameLayout SceneBodyTableControl = null;
         /// <summary>
         /// 鍏ㄩ�夋帶浠�
         /// </summary>
@@ -98,12 +102,12 @@
             bodyFrameLayout.AddChidren(tabControl);
 
             //鍒濆鍖栧満鏅甯�
-            this.SceneBodyTableControl = new FrameLayout();
+            this.SceneBodyTableControl = new NormalFrameLayout();
             SceneBodyTableControl.Y = tabControl.Bottom;
             SceneBodyTableControl.Height = bodyFrameLayout.Height - tabControl.Bottom;
             bodyFrameLayout.AddChidren(SceneBodyTableControl);
             //鍒濆鍖栬澶囨甯�
-            this.DeviceBodyTableControl = new FrameLayout();
+            this.DeviceBodyTableControl = new NormalFrameLayout();
             DeviceBodyTableControl.Y = tabControl.Bottom;
             DeviceBodyTableControl.Height = bodyFrameLayout.Height - tabControl.Bottom;
             bodyFrameLayout.AddChidren(DeviceBodyTableControl);
@@ -530,19 +534,24 @@
             frameAddBackGroud.AddChidren(btnAdd, ChidrenBindMode.BindEvent);
             frameAddBackGroud.ButtonClickEvent += (sender, e) =>
             {
-                var selectZone = new SelectZone();
-                selectZone.title = Language.StringByID(R.MyInternationalizationString.AddTo);
-                selectZone.Init();
-                selectZone.ZoneAction += (selectRoom) =>
+                HdlControlLogic.Current.ShowBottomListRoomView(string.Empty, Language.StringByID(R.MyInternationalizationString.AddTo), (selectId, selectName) =>
                 {
+                    if (selectId == string.Empty)
+                    {
+                        //閫夋嫨鐨勬槸鏈垎閰�
+                        return;
+                    }
                     //鍙樻洿浜嗗綋鍓嶆埧闂寸殑涓滆タ,涓婚〉闇�瑕佸埛鏂�
-                    if (HdlRoomLogic.Current.NowMainPageRoom.Id == selectRoom.Id)
+                    if (HdlRoomLogic.Current.NowMainPageRoom.Id == selectId)
                     {
                         this.dataHadChanged = true;
                     }
                     //淇濆瓨閫夋嫨鐨勮澶囧拰鍦烘櫙
-                    this.SaveSelectDeviceAndScene(selectRoom);
-                };
+                    var room = HdlRoomLogic.Current.GetRoomById(selectId);
+                    this.SaveSelectDeviceAndScene(room);
+                    //鍒嗙被鐣岄潰闇�瑕佸埛鏂�
+                    UserPage.Instance.RefreshCategoryForm = true;
+                });
             };
         }
 
@@ -654,6 +663,10 @@
         /// </summary>
         public override void CloseFormBefore()
         {
+            //璋冪敤鍥炶皟浜嬩欢
+            this.FormCloseEvent?.Invoke();
+            this.FormCloseEvent = null;
+
             if (this.dataHadChanged == true)
             {
                 HdlThreadLogic.Current.RunMainInThread(() =>

--
Gitblit v1.8.0