From 6de7f8a29b04737d80ad8cb17804fcc50d267bd9 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 20 十月 2023 14:21:28 +0800 Subject: [PATCH] 2.3版本 --- HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs index 05041cf..440e8f2 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs @@ -195,8 +195,23 @@ { if (sceneFunction.localFunction.spk == SPK.ElectricalTvHisense) { - sceneFunction.status.Clear(); - sceneFunction.status.Add(new SceneFunctionStatus() { key = "wol", value = "on" }); + for(int i = 0;i< sceneFunction.status.Count;i++) + { + var tvState = sceneFunction.status[i]; + if (tvState.key == FunctionAttributeKey.OnOff) + { + tvState.key = "wol"; + tvState.value = "on"; + } + else + { + if(string.IsNullOrEmpty( tvState.value)) + { + sceneFunction.status.RemoveAt(i); + i--; + } + } + } } else { -- Gitblit v1.8.0