wxr
2023-07-25 39b8b0b9bcf5805ada1a44e5dc72f05f9c6e4fcc
HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs
@@ -21,14 +21,14 @@
        public void LoadPage()
        {
            new TopViewDiv(bodyView, Language.StringByID(StringId.CombinedDimming)).LoadTopView_AddIcon("CombinedDimming",
            new TopViewDiv(bodyView, Language.StringByID(StringId.GroupControl)).LoadTopView_AddIcon("CombinedDimming",
                (s,c)=>{
                    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();
@@ -230,6 +234,8 @@
                                        {
                                            if (pack.Code == StateCode.SUCCESS)
                                            {
                                                var delTemp = FunctionList.List.groupControls.Find((obj) => groupControl.sid == obj.sid);
                                                FunctionList.List.groupControls.Remove(delTemp);
                                                list.Remove(groupControl);
                                                LoadGroupControlView(list);
                                            }