From f58a0928df594adb6c9bff6dbc4cb3c37babd104 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期三, 12 四月 2023 10:01:27 +0800 Subject: [PATCH] Merge branch 'Dev-Wxr' into wjc --- 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