From d814c978efc068425c500a553cf7ec6b4f628219 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 23 十二月 2020 22:27:19 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/CJL' into NewFilePath
---
HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs
index 68f4547..62d6a5a 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs
@@ -1,4 +1,5 @@
锘縰sing System;
+using System.Collections.Generic;
using Shared;
namespace HDL_ON.UI
@@ -47,19 +48,19 @@
}
}
function.roomIds.Clear();
- foreach (var room in Entity.DB_ResidenceData.rooms)
+ if (btnChooseAll.IsSelected)
{
- if (btnChooseAll.IsSelected)
+ foreach (var room in Entity.SpatialInfo.CurrentSpatial.RoomList)
{
- function.roomIds.Add(room.sid);
+ if (btnChooseAll.IsSelected)
+ {
+ function.roomIds.Add(room.roomId);
+ }
}
- else
- {
- function.roomIds.Remove(room.sid);
- }
- function.SaveFunctionData();
}
- Entity.DB_ResidenceData.InitRoomFunction();
+
+ function.UpdataRoomIds();
+ Entity.SpatialInfo.CurrentSpatial.InitRoomListFunctions();
};
}
@@ -70,16 +71,16 @@
{
if (isAdd)
{
- function.roomIds.Add(room.sid);
+ function.roomIds.Add(room.roomId);
room.AddRoomFunction(function);
}
else
{
- function.roomIds.Remove(room.sid);
+ function.roomIds.Remove(room.roomId);
room.RemoveRoomFunction(function);
}
- function.SaveFunctionData();
- if (function.roomIds.Count == Entity.DB_ResidenceData.rooms.Count)
+ function.UpdataRoomIds();
+ if (function.roomIds.Count == Entity.SpatialInfo.CurrentSpatial.RoomList.Count)
{
btnChooseAll.IsSelected = true;
}
--
Gitblit v1.8.0