From c88a3777ab456af4ecf01604f4b2ae4762852148 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 14 二月 2023 15:02:30 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/release0123' into wjc

---
 HDL_ON/Entity/DB_ResidenceData.cs |   23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/HDL_ON/Entity/DB_ResidenceData.cs b/HDL_ON/Entity/DB_ResidenceData.cs
index 5030525..3a0e4ee 100644
--- a/HDL_ON/Entity/DB_ResidenceData.cs
+++ b/HDL_ON/Entity/DB_ResidenceData.cs
@@ -152,7 +152,7 @@
             DriverLayer.Control.Ins.GatewayOnline_Cloud = false;
             DriverLayer.Control.Ins.GatewayOnline_Local = false;
             SpatialInfo.CurrentSpatial.Clear();
-            FunctionList.List.Clear();
+            FunctionList.List.ClearDatas();
 
             ///鍒囨崲浣忓畢娓呯┖鍓嶄綇瀹呯紦瀛樿嚜鍔ㄥ寲鍒楄〃锛�
             HDL_ON.UI.UI2.Intelligence.Automation.Logic.LogicList.Clear();
@@ -298,16 +298,27 @@
             var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this));
             WirteResidenceInfo(ssd);
         }
-        /// <summary>
-        /// 褰撳墠閫夋嫨鐨勬ゼ灞�
-        /// </summary>
-        public string CurFoor = Language.StringByID(StringId.All);
 
+
+        SpatialInfo _CurFloor;
         /// <summary>
         /// 褰撳墠閫夋嫨鐨勬ゼ灞�
         /// </summary>
         [Newtonsoft.Json.JsonIgnore]
-        public SpatialInfo CurFloor = new SpatialInfo() { roomId = "", roomName = Language.StringByID(StringId.All)};
+        public SpatialInfo CurFloor {
+            get
+            {
+                if(_CurFloor == null || _CurFloor.roomName == "")
+                {
+                    _CurFloor = new SpatialInfo() { roomId = "", roomName = Language.StringByID(StringId.All) };
+                }
+                return _CurFloor;
+            }
+            set
+            {
+                _CurFloor = value;
+            }
+        } 
         /// <summary>
         /// 鍒嗙被鐣岄潰鏄剧ず鐨勬ゼ灞�
         /// </summary>

--
Gitblit v1.8.0