From 02a194a40228251fef82dbca6c7687263b55b0b9 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 13 四月 2023 14:36:44 +0800
Subject: [PATCH] 2023年04月13日14:33:48

---
 HDL_ON/UI/UI2/1-HomePage/HomePage.cs |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
index 70a5fc2..8835c07 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -724,8 +724,9 @@
             try
             {
                 int index = 0;
-                var list = FunctionList.List.GetDeviceFunctionList();
-
+                var list = new List<Function>();
+                list.AddRange(FunctionList.List.GetDeviceFunctionList());
+                list.AddRange(FunctionList.List.groupControls);//鍔犲叆缇ゆ帶
                 foreach (var function in list)
                 {
                     //闊充箰妯″潡鏈変富浠庡叧绯伙紝闇�瑕佺壒娈婂鐞�
@@ -1024,6 +1025,7 @@
                         btnState.Text = function.lastState;
                     }
                 }
+                
                 else
                 {
                     btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png";
@@ -1221,9 +1223,16 @@
                         SelectedImagePath = "Public/SwitchOn.png",
                     };
                     view.AddChidren(btnSwitch);
-
-                    btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png";
-                    btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.png";
+                    if (function.spk == SPK.GroupControl)
+                    {
+                        btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_blue.png";
+                        btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_white.png";
+                    }
+                    else
+                    {
+                        btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png";
+                        btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.png";
+                    }
                     LoadEvent_SwitchFunction(function, btnSwitch);
                 }
                 //鍙栨秷鏀惰棌浜嬩欢

--
Gitblit v1.8.0