From d87400af518ebc9274f4447f06476959c3aa5102 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期二, 14 七月 2020 16:29:42 +0800
Subject: [PATCH] Merge branch 'dev-tzy' into dev-2020xm

---
 ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs |   27 ++++++++++++++++++++-------
 1 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs b/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs
index af70771..520287b 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs
@@ -16,6 +16,10 @@
         #region 鈻� 鍙橀噺澹版槑___________________________
 
         /// <summary>
+        /// 鐣岄潰鍏抽棴浜嬩欢
+        /// </summary>
+        public Action FormCloseEvent = null;
+        /// <summary>
         /// 娣诲姞鍒� 鐨勮儗鏅浘鎺т欢
         /// </summary>
         private FrameLayoutStatuControl frameAddBackGroud = null;
@@ -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