From 75a2f82f91d6568c0b3ea60ea93086e65f8a2e49 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 06 四月 2023 15:30:30 +0800
Subject: [PATCH] 2023年04月06日15:11:02

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

diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
index 5ba2bed..74b7a31 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
@@ -39,7 +39,7 @@
         {
 
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
-            if (titleId == StringId.Lights)
+            if (titleId == StringId.Lights && !DB_ResidenceData.Instance.CurrentRegion.isSupportGroupControl)
             {
                 Action action = () =>
                 {
@@ -255,7 +255,7 @@
                             }
                             if (function.spk == SPK.LightRGBW || function.spk == SPK.LightRGB || function.spk == SPK.LightDimming)
                             {
-                                var functionDiv = new FunctionControlZone(function)
+                                var functionDiv = new FunctionControlZone(function,null)
                                 {
                                     Gravity = Gravity.CenterHorizontal,
                                     Width = Application.GetRealWidth(343),
@@ -267,11 +267,12 @@
                                     Tag = function.spk + function.sid
                                 };
                                 functionDiv.LoadFunctionDiv();
+                                functionDiv.OrderEvent = OrderEvent;
                                 functionListView.AddChidren(functionDiv);
                             }
                             else if (function.spk == SPK.IpCam_Imou)
                             {
-                                var functionDiv = new FunctionControlZone(function)
+                                var functionDiv = new FunctionControlZone(function,null)
                                 {
                                     Gravity = Gravity.CenterHorizontal,
                                     Width = Application.GetRealWidth(343),
@@ -288,7 +289,7 @@
                             }
                             else
                             {
-                                var functionDiv = new FunctionControlZone(function)
+                                var functionDiv = new FunctionControlZone(function,null)
                                 {
                                     Gravity = Gravity.CenterHorizontal,
                                     Width = Application.GetRealWidth(343),
@@ -300,6 +301,7 @@
                                     Tag = function.spk + function.sid
                                 };
                                 functionDiv.LoadFunctionDiv();
+                                functionDiv.OrderEvent = OrderEvent;
                                 functionListView.AddChidren(functionDiv);
                             }
                             functionListView.AddChidren(new Button() { Height = Application.GetRealHeight(10) });
@@ -346,7 +348,21 @@
             })
             { IsBackground = true }.Start();
         }
-
+        /// <summary>
+        /// 鎺掑簭浜嬩欢
+        /// </summary>
+        void OrderEvent()
+        {
+            Action action = () =>
+            {
+                functionList = functionList.OrderBy(o => o.FunctionOrderNumber).ToList();
+                ShowFunctionRow(functionList);
+            };
+            var skipView = new OrderFunctionPage();
+            MainPage.BasePageView.AddChidren(skipView);
+            skipView.LoadPage(functionList, action);
+            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+        }
 
         ///// <summary>
         ///// 鍔犺浇鍔熻兘绫诲瀷鎺у埗鍗$墖

--
Gitblit v1.8.0