From 86b4742e122bb3ff19f8b61574b4bbf8e5db4b11 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期六, 12 十二月 2020 19:35:34 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/CJL' into NewFilePath --- HDL_ON/Entity/Room.cs | 20 +++++++++++++++++--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git a/HDL_ON/Entity/Room.cs b/HDL_ON/Entity/Room.cs index fd1094c..60c8e35 100644 --- a/HDL_ON/Entity/Room.cs +++ b/HDL_ON/Entity/Room.cs @@ -261,6 +261,7 @@ if(addFloor!= null) { CurrentSpatial.FloorList.Add(addFloor); + floor = addFloor; } } var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(CurrentSpatial.FloorList)); @@ -410,8 +411,21 @@ { Common.FileUtlis.Files.DeleteFile(localRoom.dataSavePath); } - RoomList.Clear(); + rooms = null; } + + public void ClearRooms() + { + if (floors != null) + { + floors.Clear(); + } + if (rooms != null) + { + rooms.Clear(); + } + } + /// <summary> /// 鍒濆鍖栨瘡涓埧闂寸殑鍔熻兘鏁版嵁 /// </summary> @@ -524,7 +538,7 @@ } if (functions.Count == 0) { - foreach (var f in DB_ResidenceData.functionList.GetAllFunction()) + foreach (var f in FunctionList.List.GetDeviceFunctionList()) { if (f.roomIds.Contains(roomId) && roomId != null) { @@ -566,7 +580,7 @@ } if (scenes.Count == 0) { - foreach (var s in DB_ResidenceData.functionList.scenes) + foreach (var s in FunctionList.List.scenes) { if (s.roomIds.Contains(roomId) && roomId != null) { -- Gitblit v1.8.0