From f9181a9c8125136f597add7c30cb2ff508d54ba7 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期四, 25 七月 2024 17:34:32 +0800
Subject: [PATCH] 2024年07月25日17:33:40

---
 HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs |   97 +++++++++++++++++++++++++++++++-----------------
 1 files changed, 63 insertions(+), 34 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
index fa38584..a7cd03f 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
@@ -164,8 +164,25 @@
             bodyView = this;
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
         }
+
         public void LoadView()
         {
+            //try
+            //{
+            //    if (MainPage.CurPageIndex == 3)
+            //    {
+            //        Application.RunOnMainThread(() =>
+            //        {
+            //            this.RemoveFromParent();
+            //            return;
+            //        });
+            //    }
+            //}
+            //catch (Exception ex)
+            //{
+            //    MainPage.Log($"鐣岄潰鍒囨崲寮傚父:{ex.Message}");
+            //}
+            MainPage.CurPageIndex = 3;
             #region 涓汉淇℃伅
             topbg = new FrameLayout()
             {
@@ -294,7 +311,9 @@
             var residenceFunctionCount = 0;
 
             #region 浣忓畢淇℃伅鍖哄煙
-            if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare && DB_ResidenceData.Instance.GatewayType == 1)
+            if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare
+                && DB_ResidenceData.Instance.GatewayType == 1
+                && DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl)
             {
                 residenceInfoView = new FrameLayout()
                 {
@@ -584,42 +603,52 @@
                     residenceAddFunctionView.AddChidren(btnResidenceAddFunctionText);
                     #endregion
 
-                    residenceFunctionCount++;
-                    #region ---浜鸿劯绠$悊
-                    var faceManagementView = new FrameLayout()
+                    if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl)
                     {
-                        X = Application.GetRealWidth(28 - 24),
-                        Y = residenceManageView.Bottom,
-                        Width = Application.GetRealWidth(64 + 48),
-                        Height = Application.GetRealWidth(64),
-                    };
-                    residenceInfoView.AddChidren(faceManagementView);
+                        residenceFunctionCount++;
+                        #region ---缁勫悎璋冨厜
+                        var faceManagementView = new FrameLayout()
+                        {
+                            X = Application.GetRealWidth(28 - 24),
+                            Y = residenceManageView.Bottom,
+                            Width = Application.GetRealWidth(64 + 48),
+                            Height = Application.GetRealWidth(64),
+                        };
+                        residenceInfoView.AddChidren(faceManagementView);
 
-                    var btnFaceManagementIcon = new Button
-                    {
-                        Gravity = Gravity.CenterHorizontal,
-                        Y = Application.GetRealHeight(5),
-                        Width = Application.GetMinRealAverage(30),
-                        Height = Application.GetMinRealAverage(30),
-                        UnSelectedImagePath = "PersonalCenter/CombinedDimmingIcon.png",
-                    };
-                    faceManagementView.AddChidren(btnFaceManagementIcon);
-                    var btnFaceManagementText = new Button()
-                    {
-                        Y = btnResidenceManageIcon.Bottom,
-                        Height = Application.GetRealHeight(29),
-                        TextID = StringId.FaceManagemant,
-                        TextAlignment = TextAlignment.Center,
-                        TextColor = CSS_Color.FirstLevelTitleColor,
-                        TextSize = CSS_FontSize.PromptFontSize_FirstLevel
-                    };
-                    faceManagementView.AddChidren(btnFaceManagementText);
-                    #endregion
+                        var btnFaceManagementIcon = new Button
+                        {
+                            Gravity = Gravity.CenterHorizontal,
+                            Y = Application.GetRealHeight(5),
+                            Width = Application.GetMinRealAverage(30),
+                            Height = Application.GetMinRealAverage(30),
+                            UnSelectedImagePath = "PersonalCenter/CombinedDimmingIcon.png",
+                        };
+                        faceManagementView.AddChidren(btnFaceManagementIcon);
+                        var btnFaceManagementText = new Button()
+                        {
+                            Y = btnResidenceManageIcon.Bottom,
+                            Height = Application.GetRealHeight(29),
+                            TextID = StringId.GroupControl,
+                            TextAlignment = TextAlignment.Center,
+                            TextColor = CSS_Color.FirstLevelTitleColor,
+                            TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+                            IsMoreLines = true,
+                        };
+                        faceManagementView.AddChidren(btnFaceManagementText);
 
-                    EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
-
-                    };
-
+                        EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
+                        {
+                            var page = new CombinedDimmingListPage();
+                            MainPage.BasePageView.AddChidren(page);
+                            page.LoadPage();
+                            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+                        };
+                        faceManagementView.MouseUpEventHandler = eventHandler;
+                        btnFaceManagementText.MouseUpEventHandler = eventHandler;
+                        btnFaceManagementIcon.MouseUpEventHandler = eventHandler;
+                        #endregion
+                    }
                 }
             }
             else

--
Gitblit v1.8.0