From 171bf03f3664226eeff2b20ee9bd2e914b63a17d Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 13 三月 2020 09:18:50 +0800
Subject: [PATCH] 20200313

---
 HDL_ON/UI/UI2/4-PersonalCenter/ResidentialManage/FloorsManagementPageBLL.cs |   24 +++++++++++++++++++-----
 1 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/ResidentialManage/FloorsManagementPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/ResidentialManage/FloorsManagementPageBLL.cs
index 211ca05..9a1b589 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/ResidentialManage/FloorsManagementPageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/ResidentialManage/FloorsManagementPageBLL.cs
@@ -38,13 +38,17 @@
         void LoadEvent_FloorChoose(Button btn)
         {
             btn.MouseUpEventHandler = (sender, e) => {
-                btn.IsSelected = true;
-                btn.IsBold = true;
                 if (lastButton != null)
                 {
                     lastButton.IsSelected = false;
-                    btn.IsBold = false;
+                    if (lastButton.Text == btn.Text)
+                    {
+                        lastButton = null;
+                    }
+                    //btn.IsBold = false;
                 }
+                btn.IsSelected = true;
+                //btn.IsBold = true;
                 lastButton = btn;
             };
         }
@@ -61,7 +65,7 @@
                     string delFloor = (sender as Button).Tag.ToString();
                     DB_ResidenceData.residenceData.floors.Remove(delFloor);
                     DB_ResidenceData.residenceData.SaveResidenceData();
-                    topCallBcak("del", delFloor);
+                    topCallBack("del", delFloor);
                 };
                 new PublicAssmebly().TipMsg(StringId.Tip, StringId.DelFloorTip, action);
             };
@@ -72,9 +76,19 @@
         /// </summary>
         void LoadEvent_BindFloor()
         {
-            btnConfrim.MouseUpEventHandler = (sender, e) => {
+            btnConfrim.MouseUpEventHandler = (sender, e) =>
+            {
+                if (lastButton != null)
+                {
+                    room.floorIndex = DB_ResidenceData.residenceData.floors.IndexOf(lastButton.Text.Trim());
+                }
                 room.floorIndex = DB_ResidenceData.residenceData.floors.IndexOf(lastButton.Text.Trim());
+                if (backAction != null)
+                {
+                    backAction();
+                }
                 bodyView.RemoveFromParent();
+                DB_ResidenceData.residenceData.SaveResidenceData();
             };
         }
 

--
Gitblit v1.8.0