From a5e01931bd780ba648fe02bf9bcb0d478d5ac892 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期四, 07 九月 2023 18:08:21 +0800
Subject: [PATCH] 2023年09月07日18:06:35

---
 HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs |   32 ++++++++++++++++++++++++++------
 1 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
index a26909b..8aa0b44 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -717,9 +717,9 @@
 
                         functionCount = FunctionList.List.GetElectricals().Count;
                         functionOnCount = FunctionList.List.GetElectricals().FindAll((obj) => obj.spk!=SPK.ElectricalTvHisense&&obj.trait_on_off.curValue.ToString() == "on").Count;
-#if DEBUG
-                        functionCount = 1;
-#endif
+//#if DEBUG
+//                        functionCount = 1;
+//#endif
                         #endregion
                         break;
                     case ShowFunction.EnergyMonitoring:
@@ -834,8 +834,10 @@
                     TextAlignment = TextAlignment.CenterLeft,
                     IsMoreLines = true,
                 };
-                functionView.AddChidren(btnName); 
+                functionView.AddChidren(btnName);
+
                 //涓嶉渶瑕佹樉绀鸿澶囧紑鐘舵�佹暟閲�;
+                Button btnFunctionCount=null;
                 if (item != ShowFunction.Aks
                     && item != ShowFunction.VideoDoorLock
                     && item != ShowFunction.Environmental
@@ -849,7 +851,7 @@
                     && item != ShowFunction.Acst && item != ShowFunction.IpCam
                     && functionCount != 0)
                 {
-                    Button btnFunctionCount = new Button()
+                    btnFunctionCount = new Button()
                     {
                         X = Application.GetRealWidth(17) + Application.GetRealWidth(7 * functionCount.ToString().Length),
                         Y = btnName.Bottom,
@@ -1249,10 +1251,16 @@
                 {
                     btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
                     {
+                        
                         var skipView = new FunctionPage();
                         MainPage.BasePageView.AddChidren(skipView);
                         skipView.LoadPage(functionPageTitleId);
                         MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+                        skipView.DelAction += () =>
+                        {
+                            functionContentView?.RemoveFromParent();
+                            this.RefreshFunctionView();
+                        };
                     };
                 }
                 index++;
@@ -1783,6 +1791,18 @@
         {
 
         }
-#endregion
+        #endregion
+
+        /// <summary>
+        /// 鏇存柊搴曢儴鐣岄潰
+        /// </summary>
+        void UpdateBottomView()
+        {
+            Application.RunOnMainThread(() =>
+            {
+                functionContentView?.RemoveFromParent();
+                this.RefreshFunctionView();
+            });
+        }
     }
 }

--
Gitblit v1.8.0