黄学彪
2019-10-15 2bf5ec775cb57d8015bee58c745a1e48081ff1b1
ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
@@ -401,11 +401,24 @@
                this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseInputRoomName));
                return false;
            }
            if (Shared.Common.Room.Lists.Find((obj) => obj.Name == this.newRoom.Name) != null)
            if (string.IsNullOrEmpty(this.floorKeys) == true)
            {
                this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.HadSameRoom));
                return false;
                if (Shared.Common.Room.Lists.Find((obj) => obj.Name == this.newRoom.Name && obj.Id != this.newRoom.Id) != null)
                {
                    this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.HadSameRoom));
                    return false;
                }
            }
            else
            {
                var listRoom = Common.Room.CurrentRoom.GetFloorSortRoom(this.floorKeys);
                if (listRoom.Find((obj) => obj.Name == this.newRoom.Name && obj.Id != this.newRoom.Id) != null)
                {
                    this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.HadSameRoom));
                    return false;
                }
            }
            if (newRoom.BackgroundImageType == 1 || newRoom.BackgroundImageType == 2)
            {
                this.newRoom.MoveBackGroundIamageFileToDirectory(newRoom.BackgroundImage, newRoom.BackgroundImage);