From 271faaf6664166dc368639b9f2e577f63f901be5 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期三, 23 十二月 2020 22:23:57 +0800 Subject: [PATCH] 20201223-99 --- HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs index d497c19..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.SpatialInfo.CurrentSpatial.RoomList) + if (btnChooseAll.IsSelected) { - if (btnChooseAll.IsSelected) + foreach (var room in Entity.SpatialInfo.CurrentSpatial.RoomList) { - function.roomIds.Add(room.roomId); + if (btnChooseAll.IsSelected) + { + function.roomIds.Add(room.roomId); + } } - else - { - function.roomIds.Remove(room.roomId); - } - function.SaveFunctionData(true); } - Entity.SpatialInfo.CurrentSpatial.InitRoomFunction(); + + function.UpdataRoomIds(); + Entity.SpatialInfo.CurrentSpatial.InitRoomListFunctions(); }; } @@ -78,7 +79,7 @@ function.roomIds.Remove(room.roomId); room.RemoveRoomFunction(function); } - function.SaveFunctionData(true); + function.UpdataRoomIds(); if (function.roomIds.Count == Entity.SpatialInfo.CurrentSpatial.RoomList.Count) { btnChooseAll.IsSelected = true; -- Gitblit v1.8.0