From 203c3a3ffde6259413d9743f6a723b95b1e7989c Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 06 七月 2023 22:43:05 +0800 Subject: [PATCH] 门锁功能 --- HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs index c009c40..c4b2d1b 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs @@ -26,9 +26,9 @@ try { var page = new AddGroupControlPage(null, - ()=> { + (newGC)=> { ReadGroupControlList(); - }); + },()=> { }); MainPage.BasePageView.AddChidren(page); page.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; @@ -98,19 +98,17 @@ list.Add(new GroupControl() { name = "缁勫悎璋冨厜1", - roomIds = new List<string> { Room.CurrentSpatial.RoomList[0].roomId }, + roomIds = new List<string> {}, sid = "00000000000000001", type = "light", - uids = new List<string>() { Room.CurrentSpatial.RoomList[0].uid }, }); list.Add(new GroupControl() { name = "缁勫悎璋冨厜2", - roomIds = new List<string> { Room.CurrentSpatial.RoomList[0].roomId }, + roomIds = new List<string> { },//Room.CurrentSpatial.RoomList[0].roomId sid = "00000000000000002", type = "light", - uids = new List<string>() { Room.CurrentSpatial.RoomList[0].uid }, }); } @@ -184,17 +182,23 @@ EventHandler<MouseEventArgs> eventHandler = (sender, e) => { var page = new AddGroupControlPage(groupControl, - () => { + (newGC) => { try { - Application.RunOnMainThread(() => + if (newGC != null) { - btnFunctionLocationInfo.Text = groupControl.GetRoomListName(); - }); + Application.RunOnMainThread(() => + { + groupControl.roomIds = newGC.uids; + btnFunctionLocationInfo.Text = newGC.GetUidListName(); + }); + } }catch(Exception ex) { MainPage.Log($"鍒锋柊缇ゆ帶鎴块棿淇℃伅寮傚父:{ex.Message}"); } + },()=> { + LoadGroupControlView(FunctionList.List.groupControls); }); MainPage.BasePageView.AddChidren(page); page.LoadPage(); -- Gitblit v1.8.0