From 46a177eb1acf7ce91af7fe9ff57af87228de938d Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 17 十月 2023 10:03:24 +0800 Subject: [PATCH] IOS库更新 --- HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs | 43 +++++++++++++++++++++++++++++++++---------- 1 files changed, 33 insertions(+), 10 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs index f75ceef..440e8f2 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs @@ -79,13 +79,13 @@ if (sceneFunction.localFunction.spk == SPK.LightRGB || sceneFunction.localFunction.spk == SPK.GroupControl) { - //var colorfulStatus = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); - //if (colorfulStatus != null) - //{ - // isColorful = true; - // LoadColorfulRow(colorfulStatus); - // isColorful = colorfulStatus.value == "on"; - //} + var colorfulStatus = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); + if (colorfulStatus != null) + { + isColorful = true; + LoadColorfulRow(colorfulStatus); + isColorful = colorfulStatus.value == "on"; + } } foreach (var attr in sceneFunction.status) { @@ -193,10 +193,33 @@ } else { - var isHasColorful = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); - if (isHasColorful != null) + if (sceneFunction.localFunction.spk == SPK.ElectricalTvHisense) { - sceneFunction.status.Remove(isHasColorful); + 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 + { + var isHasColorful = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); + if (isHasColorful != null) + { + sceneFunction.status.Remove(isHasColorful); + } } } } -- Gitblit v1.8.0