From 5428935270159bfc42c2934ed7fb1091554fc9a4 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 09 七月 2020 17:12:42 +0800 Subject: [PATCH] 修改了 sokect --- ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs | 28 +++++++++++++++++----------- 1 files changed, 17 insertions(+), 11 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs b/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs index f97e4f8..fe4fce7 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs @@ -16,13 +16,17 @@ #region 鈻� 鍙橀噺澹版槑___________________________ /// <summary> + /// 鐣岄潰鍏抽棴浜嬩欢 + /// </summary> + public Action FormCloseEvent = null; + /// <summary> /// 娣诲姞鍒� 鐨勮儗鏅浘鎺т欢 /// </summary> private FrameLayoutStatuControl frameAddBackGroud = null; /// <summary> /// 鍔熻兘鐨勬甯冩帶浠� /// </summary> - private FrameLayout DeviceBodyTableControl = null; + private NormalFrameLayout DeviceBodyTableControl = null; /// <summary> /// 鍦烘櫙鐨勫垪琛ㄦ帶浠� /// </summary> @@ -34,7 +38,7 @@ /// <summary> /// 鍦烘櫙鐨勬甯冩帶浠� /// </summary> - private FrameLayout SceneBodyTableControl = null; + private NormalFrameLayout SceneBodyTableControl = null; /// <summary> /// 鍏ㄩ�夋帶浠� /// </summary> @@ -98,12 +102,12 @@ bodyFrameLayout.AddChidren(tabControl); //鍒濆鍖栧満鏅甯� - this.SceneBodyTableControl = new FrameLayout(); + this.SceneBodyTableControl = new NormalFrameLayout(); SceneBodyTableControl.Y = tabControl.Bottom; SceneBodyTableControl.Height = bodyFrameLayout.Height - tabControl.Bottom; bodyFrameLayout.AddChidren(SceneBodyTableControl); //鍒濆鍖栬澶囨甯� - this.DeviceBodyTableControl = new FrameLayout(); + this.DeviceBodyTableControl = new NormalFrameLayout(); DeviceBodyTableControl.Y = tabControl.Bottom; DeviceBodyTableControl.Height = bodyFrameLayout.Height - tabControl.Bottom; bodyFrameLayout.AddChidren(DeviceBodyTableControl); @@ -530,19 +534,17 @@ frameAddBackGroud.AddChidren(btnAdd, ChidrenBindMode.BindEvent); frameAddBackGroud.ButtonClickEvent += (sender, e) => { - var selectZone = new SelectZone(); - selectZone.title = Language.StringByID(R.MyInternationalizationString.AddTo); - selectZone.Init(); - selectZone.ZoneAction += (selectRoom) => + HdlControlLogic.Current.ShowBottomListRoomView(string.Empty, Language.StringByID(R.MyInternationalizationString.AddTo), (selectId, selectName) => { //鍙樻洿浜嗗綋鍓嶆埧闂寸殑涓滆タ,涓婚〉闇�瑕佸埛鏂� - if (HdlRoomLogic.Current.NowMainPageRoom.Id == selectRoom.Id) + if (HdlRoomLogic.Current.NowMainPageRoom.Id == selectId) { this.dataHadChanged = true; } //淇濆瓨閫夋嫨鐨勮澶囧拰鍦烘櫙 - this.SaveSelectDeviceAndScene(selectRoom); - }; + var room = HdlRoomLogic.Current.GetRoomById(selectId); + this.SaveSelectDeviceAndScene(room); + }); }; } @@ -654,6 +656,10 @@ /// </summary> public override void CloseFormBefore() { + //璋冪敤鍥炶皟浜嬩欢 + this.FormCloseEvent?.Invoke(); + this.FormCloseEvent = null; + if (this.dataHadChanged == true) { HdlThreadLogic.Current.RunMainInThread(() => -- Gitblit v1.8.0