From f2c1e5bf3a67478076fb5bbcf546824b3127db15 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期六, 12 十二月 2020 19:11:40 +0800 Subject: [PATCH] Merge branch 'NewFilePath' into CJL --- HDL_ON/Entity/Room.cs | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/HDL_ON/Entity/Room.cs b/HDL_ON/Entity/Room.cs index bcd9ea2..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)); @@ -415,8 +416,14 @@ public void ClearRooms() { - floors.Clear(); - rooms.Clear(); + if (floors != null) + { + floors.Clear(); + } + if (rooms != null) + { + rooms.Clear(); + } } /// <summary> @@ -531,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) { @@ -573,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