From 098ca04f324624d97399c7c1040c46d2a96ebfaa Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期日, 23 四月 2023 09:21:54 +0800
Subject: [PATCH] V1.7.1发布版本

---
 HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddGroupControlPage.cs |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddGroupControlPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddGroupControlPage.cs
index b90288d..b5a8776 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddGroupControlPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddGroupControlPage.cs
@@ -50,7 +50,7 @@
         /// <summary>
         /// 鍥炶皟鍒锋柊
         /// </summary>
-        Action backActon;
+        Action<GroupControl> backActon;
         /// <summary>
         /// 鏄惁鏂板缇ゆ帶
         /// </summary>
@@ -64,7 +64,7 @@
 
         GroupControlType groupControlType = new GroupControlType();
 
-        public AddGroupControlPage(GroupControl groupControl, Action action)
+        public AddGroupControlPage(GroupControl groupControl, Action<GroupControl> action)
         {
             bodyView = this;
             if(groupControl == null)
@@ -182,6 +182,7 @@
                 Action chooseRoomBackAction = () => {
                     try
                     {
+                        groupControl.uids = groupControl.roomIds;
                         btnLocationValues.Text = groupControl.GetRoomListName();
                     }
                     catch { }
@@ -389,7 +390,7 @@
                                     {
                                         MainPage.Log($"娣诲姞缇ゆ帶鎴愬姛锛岃浆璇戣繑鍥炴暟鎹け璐�:{ex.Message}");
                                     }
-                                    backActon?.Invoke();
+                                    backActon?.Invoke(groupControl);
                                     this.RemoveFromParent();
                                 }
                                 else
@@ -440,7 +441,7 @@
                                     {
                                         temp = groupControl;
                                     }
-                                    backActon?.Invoke();
+                                    backActon?.Invoke(temp);
                                     this.RemoveFromParent();
                                 }
                                 else
@@ -542,7 +543,7 @@
         /// <summary>
         /// 鏄剧ず鐨勮澶囩殑鎬绘暟
         /// </summary>
-        int showCount = 0;
+        int showCount = -1;
 
         /// <summary>
         /// 鍔犺浇鍔熻兘row
@@ -562,7 +563,7 @@
                     {
                         if (!isAppend)
                         {
-                            showCount = 0;
+                            showCount = -1;
                             functionListView.RemoveAll();
                         }
                         for(var i =0;i<100;i++)
@@ -603,7 +604,7 @@
                                 {
                                     btnConfrim.IsSelected = false;
                                 }
-                                if (groupControlLightList.Count == functions.Count)
+                                if (groupControlLightList.Count != functions.Count)
                                 {
                                     btnChooseAll.TextID = StringId.SelectedAll;
                                 }
@@ -675,6 +676,10 @@
                 var form = new FloorRoomSelectPopupView();
                 form.ShowDeviceFunctionView(btnFloor, this.lightList, (selectId, listFunc) =>
                 {
+                    groupControlLightList.Clear();
+                    groupControl.sids.Clear();
+                    btnChooseAll.TextID = StringId.SelectAll;
+                    btnConfrim.IsSelected = false;
                     btnChooseAll.MouseUpEventHandler = (sender2, e2) => {
                         if (groupControlLightList.Count > 0)
                         {

--
Gitblit v1.8.0