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 | 29 +++++++++++++++-------------- 1 files changed, 15 insertions(+), 14 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs index 86441aa..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 @@ -46,20 +47,20 @@ } } } - function.roomIdList.Clear(); - foreach (var room in Entity.DB_ResidenceData.rooms) + function.roomIds.Clear(); + if (btnChooseAll.IsSelected) { - if (btnChooseAll.IsSelected) + foreach (var room in Entity.SpatialInfo.CurrentSpatial.RoomList) { - function.roomIdList.Add(room.sid); + if (btnChooseAll.IsSelected) + { + function.roomIds.Add(room.roomId); + } } - else - { - function.roomIdList.Remove(room.sid); - } - function.SaveFunctionData(); } - Entity.DB_ResidenceData.InitRoomFunction(); + + function.UpdataRoomIds(); + Entity.SpatialInfo.CurrentSpatial.InitRoomListFunctions(); }; } @@ -70,16 +71,16 @@ { if (isAdd) { - function.roomIdList.Add(room.sid); + function.roomIds.Add(room.roomId); room.AddRoomFunction(function); } else { - function.roomIdList.Remove(room.sid); + function.roomIds.Remove(room.roomId); room.RemoveRoomFunction(function); } - function.SaveFunctionData(); - if (function.roomIdList.Count == Entity.DB_ResidenceData.rooms.Count) + function.UpdataRoomIds(); + if (function.roomIds.Count == Entity.SpatialInfo.CurrentSpatial.RoomList.Count) { btnChooseAll.IsSelected = true; } -- Gitblit v1.8.0