wei
2021-03-08 37c315988c2dc11e4f477233f7a9f87d57bb61aa
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;
        }