From 1f4cec0e3b571e7541f0c7f3a5ea302ed586d9fb Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期四, 24 十月 2019 16:47:06 +0800 Subject: [PATCH] 2019-10-24-5 --- ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs index d4b328f..1b22eb0 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs @@ -400,11 +400,24 @@ this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseInputRoomName)); return false; } - if (Shared.Common.Room.Lists.Find((obj) => obj.Name == this.cloneRoom.Name && obj.Id != this.cloneRoom.Id) != null) + if (string.IsNullOrEmpty(this.cloneRoom.FloorId) == true) { - this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.HadSameRoom)); - return false; + if (Shared.Common.Room.Lists.Find((obj) => obj.Name == this.cloneRoom.Name && obj.Id != this.cloneRoom.Id) != null) + { + this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.HadSameRoom)); + return false; + } } + else + { + var listRoom = Common.Room.CurrentRoom.GetFloorSortRoom(this.cloneRoom.FloorId); + if (listRoom.Find((obj) => obj.Name == this.cloneRoom.Name && obj.Id != this.cloneRoom.Id) != null) + { + this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.HadSameRoom)); + return false; + } + } + if (cloneRoom.BackgroundImageType == 1 || cloneRoom.BackgroundImageType == 2) { this.cloneRoom.MoveBackGroundIamageFileToDirectory(cloneRoom.BackgroundImage, cloneRoom.BackgroundImage); -- Gitblit v1.8.0