From 83df0ebfbd306d0fb5a51a21a7ef2271c0c507ec Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 09 三月 2021 19:39:26 +0800
Subject: [PATCH] 2021-3-9-1

---
 HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs
index 06fcb00..f598e88 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs
@@ -103,7 +103,7 @@
 
             VerticalScrolViewLayout vv = new VerticalScrolViewLayout();
             frameLayout.AddChidren(vv);
-            RefreshView(vv, false);
+            RefreshView(vv, false, control);
             #endregion
 
             #region  鐣岄潰鐐瑰嚮浜嬩欢
@@ -117,13 +117,13 @@
                     topView.topIconBtn.Text = Language.StringByID(StringId.wancheng);
                     topView.topIconBtn.TextSize = TextSize.text14;
                     topView.topIconBtn.TextColor = CSS.CSS_Color.textColor;
-                    RefreshView(vv, true);
+                    RefreshView(vv, true, control);
                 }
                 else
                 {
                     topView.topIconBtn.UnSelectedImagePath = "PirIcon/del.png";
                     topView.topIconBtn.Text = "";
-                    RefreshView(vv, false);
+                    RefreshView(vv, false, control);
                 }
 
 
@@ -164,18 +164,18 @@
         /// </summary>
         /// <param name="vv">涓婁笅婊戝姩鎺т欢</param>
         /// <param name="if_bool">琛ㄧず鏄惁鏄剧ず鍒犻櫎鍥炬爣</param>
-        void RefreshView(VerticalScrolViewLayout vv, bool if_bool)
+        void RefreshView(VerticalScrolViewLayout vv, bool if_bool, Control control)
         {
             vv.RemoveAll();
             //瀹氫箟涓�涓彉閲忚褰曡鏁�
             int sum = 0;
-            if (Pir.BuottonList.Count % 3 == 0)
+            if (control.status.Count % 3 == 0)
             {
-                sum = Pir.BuottonList.Count / 3;
+                sum = control.status.Count / 3;
             }
             else
             {
-                sum = Pir.BuottonList.Count / 3 + 1;
+                sum = control.status.Count / 3 + 1;
             }
             //璁$畻鍔犺浇鍑烘潵鐨勬暟鎹渶瑕佺殑楂樺害
             int h = 16 + sum * (16 + 44) + 104 + 76;
@@ -186,9 +186,9 @@
                 Height = Application.GetRealWidth(h),
             };
             vv.AddChidren(FLayout);
-            for (int i = 1, j = 0; i <= Pir.BuottonList.Count; i++, j++)
+            for (int i = 1, j = 0; i <= control.status.Count; i++, j++)
             {
-                var nameObj = Pir.BuottonList[i - 1];
+                var nameObj = control.status[i - 1];
                 //鎸夐挳
                 var buttonNameBtn = new Button
                 {
@@ -245,12 +245,12 @@
                                 if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "")
                                 {
                                     ///杩欓噷锛氱洃鍚琈TTP鎺ㄩ�佷笅鏉ヤ富棰橈紝鎵嶇煡閬撴槸鍚︽坊鍔犳垚鍔�
-                                    var buttonObj = Pir.BuottonList.Find((c) => c.value == obj.value);
+                                    var buttonObj = control.status.Find((c) => c.value == obj.value);
                                     if (buttonObj != null)
                                     {
-                                        Pir.BuottonList.Remove(buttonObj);
+                                        control.status.Remove(buttonObj);
                                     }
-                                    RefreshView(vv, true);
+                                    RefreshView(vv, true, control);
                                 }
                                 else {
                                     Method method = new Method();

--
Gitblit v1.8.0