From 09bde2ffef953fa5e78a4320aa8bbe03276ed7c5 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 23 三月 2021 09:19:54 +0800
Subject: [PATCH] Merge branch 'WJC' into temp-wxr

---
 HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs |   31 +++++++++++++++++++++++--------
 1 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
index 8f38cfb..0be0bba 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
@@ -14,7 +14,11 @@
         /// <summary>
         /// 鍥炶皟
         /// </summary>
-        public Action BackAction;
+        public static Action BackAction;
+        /// <summary>
+        /// 
+        /// </summary>
+        Button addDevice;
         /// <summary>
         /// 涓存椂鍌ㄥ瓨璁惧绫诲瀷鍒楄〃
         /// </summary>
@@ -26,9 +30,12 @@
             topView.topNameBtn.TextID = StringId.hongwaiyaokong;
             topView.topIconBtn.Visible = true;
             this.AddChidren(topView.FLayoutView());
-            topView.clickBackBtn.MouseUpEventHandler += (sender, e) => {
+            topView.clickBackBtn.MouseUpEventHandler += (sender, e) =>
+            {
                 BackAction();
-                this.RemoveFromParent(); };
+                BackAction = null;
+                this.RemoveFromParent();
+            };
 
             FrameLayout middFLayout = new FrameLayout();
             middFLayout.Y = Application.GetRealHeight(64);
@@ -38,19 +45,22 @@
             VerticalRefreshLayout vv = new VerticalRefreshLayout();
             middFLayout.AddChidren(vv);
             //鍔犲彿鍥炬爣
-            Button addDevice = new Button
+            addDevice = new Button
             {
                 Y = Application.GetRealHeight(480),
                 X = Application.GetRealWidth(293),
                 Width = Application.GetRealWidth(82),
                 Height = Application.GetRealWidth(84),
                 UnSelectedImagePath = "PirIcon/add.png",
-            };
+                Visible=false,
 
+            };
+            middFLayout.AddChidren(addDevice);
             if (Pir.currPir.FunctioList.Count < 10)
             {
                 //10涓仴鎺у櫒灏变細闅愯棌娣诲姞鍥炬爣
-                middFLayout.AddChidren(addDevice);
+                // middFLayout.AddChidren(addDevice);
+                addDevice.Visible = true;
             }
 
             vv.BeginHeaderRefreshingAction += () =>
@@ -77,7 +87,7 @@
                 MainPage.BasePageView.AddChidren(setPir);
                 setPir.Show(() =>
                 {
-                    BackAction();
+                    //BackAction();
                     ////鍒锋柊鐣岄潰
                     UIView(vv);
                 });
@@ -267,7 +277,12 @@
                                 Pir.currPir.FunctioList.Remove(Function);
                             }
                             UIView(vv);
-
+                            if (Pir.currPir.FunctioList.Count < 10)
+                            {
+                                //10涓仴鎺у櫒灏变細闅愯棌娣诲姞鍥炬爣
+                                // middFLayout.AddChidren(addDevice);
+                                addDevice.Visible = true;
+                            }
                         }, "鍒犻櫎", "dialog", null, dialog);
 
                     }, () => { }, false);

--
Gitblit v1.8.0