wxr
2021-03-15 6e580804d74d7a6fb118b6ba381e88aa81f267c7
HDL_ON/Entity/Room.cs
@@ -74,10 +74,11 @@
        {
            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();
@@ -88,7 +89,6 @@
            //楼层房间列表
            if (floorUpdateList != null && floorUpdateList.Count > 0)
            {
                FloorList.Clear();
                foreach (var updateTemp in floorUpdateList)
                {
                    FloorList.Add(updateTemp);
@@ -325,9 +325,10 @@
        /// </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;
        }