From 098ca04f324624d97399c7c1040c46d2a96ebfaa Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期日, 23 四月 2023 09:21:54 +0800
Subject: [PATCH] V1.7.1发布版本

---
 HDL_ON/UI/UI2/1-HomePage/HomePage.cs |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
index 631866a..987ec8e 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -724,7 +724,8 @@
             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";
@@ -1056,7 +1058,7 @@
                 if (//SPK.CurtainSpkList().Contains(function.spk))
                     function.spk == SPK.CurtainRoller || function.spk == SPK.CurtainShades ||
                     function.spk == SPK.CurtainDream ||
-                    function.spk == SPK.CurtainSwitch || function.spk == SPK.CurtainTrietex )
+                    function.spk == SPK.CurtainSwitch || function.spk == SPK.CurtainTrietex)
                 {
                     btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainIcon.png";
                     btnIcon.SelectedImagePath = "FunctionIcon/Curtain/CurtainOnIcon.png";
@@ -1141,7 +1143,7 @@
                             btnPower.IsSelected = true;
                             status = "on";
                         }
-                       function.SetAttrState("on_off", status);
+                        function.SetAttrState("on_off", status);
                         Dictionary<string, string> dic = new Dictionary<string, string>();
                         dic.Add("on_off", status);
                         Music.SendMethod.Current.SendControlCommand(function, dic);
@@ -1155,7 +1157,7 @@
                     Button btnUp;
                     btnUp = new Button()
                     {
-                        X = Application.GetRealWidth(84+3),
+                        X = Application.GetRealWidth(84 + 3),
                         Y = Application.GetRealWidth(89),
                         Width = Application.GetRealWidth(38),
                         Height = Application.GetRealWidth(38),
@@ -1180,7 +1182,7 @@
                     LoadEvent_ControlClothesHanger(function, btnUp, btnDown);
 
                 }
-                
+
                 else if (function.spk == SPK.SenesorMegahealth || function.spk == SPK.SensorMmvPose)
                 {
                     //btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}.png";
@@ -1205,8 +1207,13 @@
                 }
                 else if (function.spk == SPK.VideoDoorLock)
                 {
-                    btnIcon.UnSelectedImagePath =UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.GetVideoDoorLockIcon(UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.collect);
+                    btnIcon.UnSelectedImagePath = UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.GetVideoDoorLockIcon(UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.collect);
                     //btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png";
+                }
+                else if (function.spk == SPK.GroupControl)
+                {
+                    btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_blue.png";
+                    btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_white.png";
                 }
                 else
                 {
@@ -1221,7 +1228,6 @@
                         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";
                     LoadEvent_SwitchFunction(function, btnSwitch);

--
Gitblit v1.8.0