From 23420922845c9e77019a55c3b3e3271eb1ec261e Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 13 七月 2020 11:42:18 +0800
Subject: [PATCH] 新版本

---
 ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
index 78a495d..7451d5d 100755
--- a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -152,18 +152,21 @@
                 btnFloorName.Y = Application.GetRealHeight(17);
                 btnFloorName.TextAlignment = TextAlignment.CenterRight;
                 btnFloorName.IsBold = true;
-                btnFloorName.Text = HdlResidenceLogic.Current.GetFloorNameById(Config.Instance.Home.CurrentFloorId);
+                btnFloorName.Text = Common.Config.Instance.Home.GetCurrentFloorName;
                 frameSwitchBack.AddChidren(btnFloorName);
                 btnFloorName.ButtonClickEvent += (sender, e) =>
                 {
                     var floors = new SelectFloorForm();
+                    floors.CurFloorId = Config.Instance.Home.CurrentFloorId;
                     AddChidren(floors);
                     floors.Init(580, 330, Direction.Right);
-                    floors.changeFloor = true;
                     floors.FloorAction += (floorId) =>
                     {
                         btnFloorName.Text = HdlResidenceLogic.Current.GetFloorNameById(floorId);
+                        Config.Instance.Home.CurrentFloorId = floorId;
                         HdlRoomLogic.Current.NowCategoryRoom = HdlRoomLogic.Current.GetLoveRoom();
+                        //杩欎釜鏃跺�欓渶瑕佸埛鏂颁富椤�
+                        UserPage.Instance.RefreshMainPageForm = true;
                         //鍒锋柊bodyView
                         this.RefreshBodyView();
                     };
@@ -277,7 +280,7 @@
         private void InitRoomMenuControl()
         {
             //褰撳墠妤煎眰鐨勫叏閮ㄦ埧闂�
-            var lisrRoom = HdlRoomLogic.Current.GetRoomsByCurrentFloorIdAppendLoveRoom();
+            var lisrRoom = HdlRoomLogic.Current.GetRoomsByFloorIdAppendLoveRoom(Config.Instance.Home.CurrentFloorId);
             if (HdlRoomLogic.Current.NowCategoryRoom == null)
             {
                 //璁剧疆绗竴涓负鍒濆鎴块棿
@@ -633,12 +636,13 @@
                         HdlThreadLogic.Current.RunMain(() =>
                         {
                             listview1.EndHeaderRefreshing();
-                            if (result == true)
+                            //listview1.Parent涓簄ull浠h〃瀹冨垏鎹㈡埧闂翠簡
+                            if (result == true && listview1.Parent != null)
                             {
-                                //鍦ㄥ闈㈡竻绌�(鐗规晥鐨勯棶棰�)
-                                this.functionSceneBodyView.RemoveAll();
                                 //鍒锋柊鍦烘櫙鐨勬椂鍊�,鍏抽棴宸﹀垝鑿滃崟鐨勬湭鍒嗛厤鐣岄潰
                                 MainPage.LeftListRoomViewFrom.Instance?.CloseUnallocatedRoomForm();
+                                //鍦ㄥ闈㈡竻绌�(鐗规晥鐨勯棶棰�)
+                                this.functionSceneBodyView.RemoveAll();
 
                                 HdlThreadLogic.Current.RunMainInThread(() =>
                                 {
@@ -820,7 +824,11 @@
                         //宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉 2020.05.09:鍒犻櫎Ack涓婚
                         this.dicDeviceRowControl[mainKeys].SetHadGetResponeResultStatu();
                         //鍒锋柊鎺т欢
-                        this.dicDeviceRowControl[mainKeys].RefreshControlInfo(locadevice);
+                        if (locadevice.Type != DeviceType.IASZone)
+                        {
+                            //浼犳劅鍣ㄤ笉闇�瑕佸睘鎬т笂鎶�(浣嗘槸閭d釜鐞冨瀷浼犳劅鍣ㄥ眳鐒朵細灞炴�т笂鎶�)
+                            this.dicDeviceRowControl[mainKeys].RefreshControlInfo(locadevice);
+                        }
                     }
                 }, ShowErrorMode.NO);
             });

--
Gitblit v1.8.0