From ed2f4a97aa48cdb4a013d2a389877f52eb3eccdf Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期二, 29 十月 2019 13:15:59 +0800 Subject: [PATCH] Merge branch 'DEV_GXC' of http://172.16.1.23:6688/r/~xm/HomeApp into DEV_GXC --- ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs | 55 +++++++++++++++---------------------------------------- 1 files changed, 15 insertions(+), 40 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs index a737171..d4b328f 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs @@ -12,10 +12,6 @@ #region 鈻� 鍙橀噺澹版槑___________________________ /// <summary> - /// 缁撴潫缂栬緫鍚嶇О鐨勪簨浠� - /// </summary> - public Action<string> FinishEditorEvent = null; - /// <summary> /// 鍒楄〃鎺т欢 /// </summary> private VerticalListControl listview = null; @@ -86,23 +82,19 @@ //搴曠嚎 txtRoomName.AddBottomLine(); - //璇PP涓烘湁妤煎眰鐨勬ā寮忔墠寮�鍚繖涓彍鍗� - if (string.IsNullOrEmpty(this.cloneRoom.FloorId) == false) + //銆愭墍灞炴ゼ灞傘�� + var btnBelone = new FrameCaptionViewControl(Language.StringByID(R.MyInternationalizationString.uBelongeFloor), Common.Config.Instance.Home.FloorDics[this.cloneRoom.FloorId], this.listview.rowSpace / 2); + listview.AddChidren(btnBelone); + btnBelone.InitControl(); + //鍙崇澶� + btnBelone.AddRightArrow(); + //搴曠嚎 + btnBelone.AddBottomLine(); + btnBelone.ButtonClickEvent += (sender, e) => { - //銆愭墍灞炴ゼ灞傘�� - var btnBelone = new FrameCaptionViewControl(Language.StringByID(R.MyInternationalizationString.uBelongeFloor), Common.Config.Instance.Home.FloorDics[this.cloneRoom.FloorId], this.listview.rowSpace / 2); - listview.AddChidren(btnBelone); - btnBelone.InitControl(); - //鍙崇澶� - btnBelone.AddRightArrow(); - //搴曠嚎 - btnBelone.AddBottomLine(); - btnBelone.ButtonClickEvent += (sender, e) => - { - //妤煎眰閫夋嫨 - this.ShowSelectFloor(btnBelone); - }; - } + //妤煎眰閫夋嫨 + this.ShowSelectFloor(btnBelone); + }; //銆愭俯搴︺�� var rowTemperature = new FrameRowControl(this.listview.rowSpace / 2); @@ -160,8 +152,6 @@ return; } editorRoom.Save(); - - FinishEditorEvent?.Invoke(this.cloneRoom.Name); this.CloseForm(); }; } @@ -388,8 +378,6 @@ /// </summary> public override void CloseForm() { - this.FinishEditorEvent = null; - HdlDeviceAttributeLogic.Current.RemoveEvent("TemperatrueDevice"); HdlDeviceAttributeLogic.Current.RemoveEvent("HumidityDevice"); @@ -412,24 +400,11 @@ this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseInputRoomName)); return false; } - if (string.IsNullOrEmpty(this.cloneRoom.FloorId) == true) + if (Shared.Common.Room.Lists.Find((obj) => obj.Name == this.cloneRoom.Name && obj.Id != this.cloneRoom.Id) != null) { - 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; - } + 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