From e89eff06b335a16eaaa043b18f35f5463e1bc203 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 18 四月 2023 17:53:49 +0800 Subject: [PATCH] 群控编辑问题修复 --- HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs index 631866a..8835c07 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"; @@ -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