old mode 100644
new mode 100755
| | |
| | | } |
| | | } |
| | | function.roomIds.Clear(); |
| | | foreach (var room in Entity.DB_ResidenceData.rooms) |
| | | foreach (var room in Entity.SpatialInfo.CurrentSpatial.RoomList) |
| | | { |
| | | if (btnChooseAll.IsSelected) |
| | | { |
| | | function.roomIds.Add(room.sid); |
| | | function.roomIds.Add(room.roomId); |
| | | } |
| | | else |
| | | { |
| | | function.roomIds.Remove(room.sid); |
| | | function.roomIds.Remove(room.roomId); |
| | | } |
| | | function.SaveFunctionData(); |
| | | function.SaveFunctionData(true); |
| | | } |
| | | Entity.DB_ResidenceData.InitRoomFunction(); |
| | | Entity.SpatialInfo.CurrentSpatial.InitRoomFunction(); |
| | | }; |
| | | } |
| | | |
| | |
| | | { |
| | | 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.SaveFunctionData(true); |
| | | if (function.roomIds.Count == Entity.SpatialInfo.CurrentSpatial.RoomList.Count) |
| | | { |
| | | btnChooseAll.IsSelected = true; |
| | | } |