From 4975f3d6beb81e3967b1018d629be9c3410b9ea3 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 25 三月 2021 15:43:34 +0800
Subject: [PATCH] Merge branch 'WJC' into temp-wxr

---
 HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs |   21 ++++++---------------
 1 files changed, 6 insertions(+), 15 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs
index ab952eb..74c6a9e 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs
@@ -10,19 +10,16 @@
     {
         public SetPir()
         {
-            Tag = "PirMain";
+            Tag = "PirView";
         }
-        Action backAction;
-        public void Show(Action action)
+        public void Show()
         {
-            backAction = action;
             #region 鐣岄潰甯冨眬
             this.BackgroundColor = CSS.CSS_Color.viewMiddle;
             Intelligence.Automation.LogicView.TopView topView = new Intelligence.Automation.LogicView.TopView();
             this.AddChidren(topView.FLayoutView());
             topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
             {
-                //action();
                 RemoveFromParent();
             };
             topView.topNameBtn.TextID = StringId.setlogic;
@@ -113,16 +110,8 @@
                             Pir.pirDeviceList.Remove(Pir.currPir);
                         }
                         dialog.Close();
-                        action();
                         this.RemoveFromParent();
-                        for (int i = MainPage.BasePageView.ChildrenCount - 1; 0 <= i; i--)
-                        {
-                            var view = MainPage.BasePageView.GetChildren(i);
-                            if (view.GetType() == typeof(PirMain))
-                            {
-                                view.RemoveFromParent();
-                            }
-                        }
+                        Method.RemoveView("PirMain");
                     }, "鍒犻櫎", "dialog", null, dialog);
 
                 }, () =>
@@ -141,8 +130,10 @@
         /// </summary>
         public override void RemoveFromParent()
         {
-            backAction();
+            //鍒锋柊PirMain鐣岄潰
+            Method.RefreshView("PirMain");
             base.RemoveFromParent();
+          
         }
     }
 }

--
Gitblit v1.8.0