From 31497bb69602433d94c8a28ea01c3ee3c7cc8576 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 24 十月 2019 14:32:30 +0800 Subject: [PATCH] 完全合并了Wjc,Xm 的 代码 --- ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs index df60c3a..7d95668 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs +++ b/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); -- Gitblit v1.8.0