From a9d1161b1df96e7ddad566335989a1444e433ef5 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 28 三月 2023 11:54:45 +0800
Subject: [PATCH] 2023年03月28日11:52:02

---
 HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs |   74 ++++++++++++++++++++----------------
 1 files changed, 41 insertions(+), 33 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
index 230d2f6..13115eb 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
@@ -86,38 +86,38 @@
             //鍒ゆ柇鏄惁闇�瑕侀殣钘忚嚜鍔ㄥ寲
             if (HideAutoPage)
             {
-                if (false && DB_ResidenceData.Instance.GatewayType == 1)//缃戝叧闇�瑕佸姞杞藉畨闃�--2021-11-28 19:56:53  鍒樻檽杈夊皢瀹夐槻鏀惧叆鏀圭晫闈�
-                {
-                    btnSceneTilte  = new Button()
-                    {
-                        Y = Application.GetRealHeight(30),
-                        Width = Application.GetRealWidth(170),
-                        Height = Application.GetRealHeight(25),
-                        TextAlignment = TextAlignment.CenterRight,
-                        TextSize = CSS_FontSize.HeadlineFontSize,
-                        TextColor = CSS_Color.PromptingColor1,
-                        SelectedTextColor = CSS_Color.MainColor,
-                        TextID = StringId.Scenes,
-                        IsSelected = true
-                    };
-                    topView.AddChidren(btnSceneTilte);
+                //if (DB_ResidenceData.Instance.GatewayType == 1)//缃戝叧闇�瑕佸姞杞藉畨闃�--2021-11-28 19:56:53  鍒樻檽杈夊皢瀹夐槻鏀惧叆璇ョ晫闈�
+                //{
+                //    btnSceneTilte  = new Button()
+                //    {
+                //        Y = Application.GetRealHeight(30),
+                //        Width = Application.GetRealWidth(170),
+                //        Height = Application.GetRealHeight(25),
+                //        TextAlignment = TextAlignment.CenterRight,
+                //        TextSize = CSS_FontSize.HeadlineFontSize,
+                //        TextColor = CSS_Color.PromptingColor1,
+                //        SelectedTextColor = CSS_Color.MainColor,
+                //        TextID = StringId.Scenes,
+                //        IsSelected = true
+                //    };
+                //    topView.AddChidren(btnSceneTilte);
 
-                    btnSecurityTitle = new Button()
-                    {
-                        X = Application.GetRealWidth(209),
-                        Y = Application.GetRealHeight(30),
-                        Width = Application.GetRealWidth(170),
-                        Height = Application.GetRealHeight(25),
-                        TextAlignment = TextAlignment.CenterLeft,
-                        TextSize = CSS_FontSize.TextFontSize,
-                        TextColor = CSS_Color.PromptingColor1,
-                        SelectedTextColor = CSS_Color.MainColor,
-                        TextID = StringId.anfang,
-                    };
-                    topView.AddChidren(btnSecurityTitle);
-                    btnAutomationTitle = new Button();
-                }
-                else
+                //    btnSecurityTitle = new Button()
+                //    {
+                //        X = Application.GetRealWidth(209),
+                //        Y = Application.GetRealHeight(30),
+                //        Width = Application.GetRealWidth(170),
+                //        Height = Application.GetRealHeight(25),
+                //        TextAlignment = TextAlignment.CenterLeft,
+                //        TextSize = CSS_FontSize.TextFontSize,
+                //        TextColor = CSS_Color.PromptingColor1,
+                //        SelectedTextColor = CSS_Color.MainColor,
+                //        TextID = StringId.anfang,
+                //    };
+                //    topView.AddChidren(btnSecurityTitle);
+                //    btnAutomationTitle = new Button();
+                //}
+                //else
                 {
 
                     btnSceneTilte = new Button()
@@ -139,7 +139,7 @@
             }
             else
             {
-                if (false && DB_ResidenceData.Instance.GatewayType == 1)//缃戝叧闇�瑕佸姞杞藉畨闃�--2021-11-28 19:56:53  鍒樻檽杈夊皢瀹夐槻鏀惧叆鏀圭晫闈�
+                if (DB_ResidenceData.Instance.GatewayType == 1)
                 {
                     btnAutomationTitle = new Button()
                     {
@@ -401,6 +401,14 @@
                     {
                         foreach (var scene in listScene)
                         {
+                            if(scene == null)
+                            {
+                                continue;
+                            }
+                            if(scene.sceneType == SceneType.LightScene)
+                            {
+                                continue;
+                            }
                             System.Threading.Thread.Sleep(10);
                             Application.RunOnMainThread(() =>
                             {
@@ -695,7 +703,7 @@
                     btnAutomationTitle.TextSize = CSS_FontSize.TextFontSize;
                     btnSceneTilte.IsSelected = false;
                     btnSceneTilte.TextSize = CSS_FontSize.TextFontSize;
-                    contentPageView.PageIndex = 2;
+                    contentPageView.PageIndex = contentPageView.ChildrenCount - 1;
                 };
             }
         }

--
Gitblit v1.8.0