| | |
| | | { |
| | | var roomUpdateList = spatials.FindAll((obj) => obj.roomType == "ROOM"); |
| | | var floorUpdateList = spatials.FindAll((obj) => obj.roomType == "FLOOR"); |
| | | CurrentSpatial.DeleteAllRoom(); |
| | | FloorList.Clear(); |
| | | //处理房间列表 |
| | | if (roomUpdateList != null && roomUpdateList.Count > 0) |
| | | { |
| | | CurrentSpatial.DeleteAllRoom(); |
| | | foreach (var newRoom in roomUpdateList) |
| | | { |
| | | newRoom.SaveRoomFile(); |
| | |
| | | //楼层房间列表 |
| | | if (floorUpdateList != null && floorUpdateList.Count > 0) |
| | | { |
| | | FloorList.Clear(); |
| | | foreach (var updateTemp in floorUpdateList) |
| | | { |
| | | FloorList.Add(updateTemp); |
| | |
| | | /// </summary> |
| | | public void DeleteAllRoom() |
| | | { |
| | | foreach(var localRoom in RoomList) |
| | | for(int i=0;i< RoomList.Count;) |
| | | { |
| | | Common.FileUtlis.Files.DeleteFile(localRoom.dataSavePath); |
| | | Common.FileUtlis.Files.DeleteFile(RoomList[i].dataSavePath); |
| | | RoomList.RemoveAt(i); |
| | | } |
| | | rooms = null; |
| | | } |