From 5428935270159bfc42c2934ed7fb1091554fc9a4 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 09 七月 2020 17:12:42 +0800
Subject: [PATCH] 修改了 sokect

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

diff --git a/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs b/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs
index af70771..fe4fce7 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,17 @@
             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 (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);
+                });
             };
         }
 
@@ -654,6 +656,10 @@
         /// </summary>
         public override void CloseFormBefore()
         {
+            //璋冪敤鍥炶皟浜嬩欢
+            this.FormCloseEvent?.Invoke();
+            this.FormCloseEvent = null;
+
             if (this.dataHadChanged == true)
             {
                 HdlThreadLogic.Current.RunMainInThread(() =>

--
Gitblit v1.8.0