From 0ebc1d3ca4e879a47adefe587d281b50e82ef8b6 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 26 九月 2023 14:54:00 +0800 Subject: [PATCH] 海信电视支持场景 --- 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