From bba578c2f0acf2eca747edcb69426771e0cadd32 Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期一, 23 三月 2020 18:20:50 +0800
Subject: [PATCH] 2020-03-23-3

---
 ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
index 93cc3e8..30cd414 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
@@ -194,7 +194,7 @@
                     frame.AddRowMenu(Language.StringByID(R.MyInternationalizationString.uCreatFloor), "Item/CreatFloor.png", "Item/CreatFloorSelected.png", () =>
                     {
                         //鍒涘缓妤煎眰
-                        this.CreatOrEditorFloor(null, string.Empty, string.Empty);
+                        this.CreatOrEditorFloor(null, null, string.Empty, string.Empty);
                     });
                     //鍒涘缓鎴块棿
                     frame.AddRowMenu(Language.StringByID(R.MyInternationalizationString.uCreatRoom), "Item/RoomIcon.png", "Item/RoomIconSelected.png", () =>
@@ -212,7 +212,7 @@
                 else if (AppResidenceMode == 1)
                 {
                     //鍒涘缓妤煎眰
-                    this.CreatOrEditorFloor(null, string.Empty, string.Empty);
+                    this.CreatOrEditorFloor(null, null, string.Empty, string.Empty);
                 }
                 //鏃犳ゼ灞傛ā寮�
                 else if (AppResidenceMode == 2)
@@ -335,7 +335,7 @@
                 btnChanged.ButtonClickEvent += (sender, e) =>
                 {
                     //鍒涘缓鎴栬�呯紪杈戞ゼ灞�
-                    this.CreatOrEditorFloor(btnFloor, keys, floorName);
+                    this.CreatOrEditorFloor(frameRow, btnFloor, keys, floorName);
                 };
 
                 //鍒犻櫎
@@ -409,7 +409,7 @@
         /// <param name="btnFloor"></param>
         /// <param name="keys"></param>
         /// <param name="floorName"></param>
-        private void CreatOrEditorFloor(NormalViewControl btnFloor, string keys, string floorName)
+        private void CreatOrEditorFloor(RowLayoutControl frameRow, NormalViewControl btnFloor, string keys, string floorName)
         {
             //鐢熸垚涓�涓脊绐楃敾闈�
             var dialogForm = new DialogInputControl();
@@ -441,6 +441,8 @@
                 }
                 //鐢婚潰鍏抽棴
                 dialogForm.CloseDialog();
+                //杩樺師宸﹀彸鑿滃崟
+                frameRow?.HideMenu();
                 if (floorName != textValue)
                 {
                     //缂栬緫鎴栬�呭垱寤烘ゼ灞傚悕绉�
@@ -450,6 +452,10 @@
                     }
                     Common.Config.Instance.Home.FloorDics[keys] = textValue;
                     Common.Config.Instance.Home.Save();
+                    if (Common.Config.Instance.Home.CurrentFloorId == string.Empty)
+                    {
+                        Common.Config.Instance.Home.CurrentFloorId = keys;
+                    }
                     if (btnFloor != null)
                     {
                         btnFloor.Text = textValue;
@@ -560,6 +566,8 @@
             var btnEditor = frameRow.AddEditorControl();
             btnEditor.ButtonClickEvent += (sender, e) =>
             {
+                //鍏抽棴宸﹀彸鑿滃崟
+                frameRow.HideMenu();
                 var form = new EditorRoomInforForm();
                 form.AddForm(room);
                 form.FinishEditorEvent += (roomName) =>
@@ -707,7 +715,7 @@
                     //閿欒:缃戝叧瀵硅薄涓㈠け
                     continue;
                 }
-                var result = HdlGatewayLogic.Current.SetGatewaySite(gateway, longitude, latitude);
+                var result = HdlGatewayLogic.Current.SetGatewaySite(gateway, longitude, latitude, ShowErrorMode.YES);
                 if (result == false)
                 {
                     //鍏抽棴杩涘害鏉�

--
Gitblit v1.8.0