From 1eb43291d6f565fd8106ee401240d1c7a41da776 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期一, 27 九月 2021 09:31:46 +0800
Subject: [PATCH] 组合调光

---
 HDL_ON/UI/UI2/2-Classification/FunctionPage.cs |   26 +++++++++++++++++++++++---
 1 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
index 1536bbb..74fe7e8 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
@@ -38,8 +38,21 @@
         public void LoadPage(int titleId)
         {
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
-            new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
-
+            if (titleId == StringId.Lights)
+            {
+                Action action = () =>
+                {
+                    var skipView = new AddLightScene(new List<Function>(), new Scene() { sceneType = SceneType.LightScene });
+                    MainPage.BasePageView.AddChidren(skipView);
+                    skipView.LoadPage();
+                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+                };
+                new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView_LightFunction(action);
+            }
+            else
+            {
+                new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
+            }
             /// <summary>
             /// 鎴块棿鍐呭鏄剧ず鍖哄煙
             /// </summary>
@@ -108,6 +121,10 @@
             else if (titleId == StringId.Sensor)
             {
                 functionList.AddRange(FunctionList.List.GetArmSensorList());
+            }
+            else if (titleId == StringId.FreshAir)
+            {
+                functionList.AddRange(FunctionList.List.GetAirFreshList());
             }
             functionList.OrderByDescending(o => o.controlCounter).ToList();
 
@@ -124,7 +141,10 @@
             functionListView.RemoveAll();
             foreach (var function in showList)
             {
-
+                if(function.spk == SPK.SensorDryContact)
+                {
+                    continue;
+                }
                 if (function.spk == SPK.LightRGB || function.spk == SPK.LightDimming)
                 {
                     var functionDiv = new FunctionControlZone(function)

--
Gitblit v1.8.0