From c4f0723cc7053933a6e598eb0c58cfdf4e9d7459 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 04 一月 2021 14:13:01 +0800 Subject: [PATCH] Merge branch 'WJC' into NewFilePath --- 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 old mode 100755 new mode 100644 index d497c19..62d6a5a --- 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