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 | 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