From 489d3bd60ad7dc2fecb398b09cf4c52df16f0fc2 Mon Sep 17 00:00:00 2001 From: Davin <591807572@qq.com> Date: 星期三, 26 七月 2023 15:55:30 +0800 Subject: [PATCH] Merge branch 'Dev-Branch' of http://59.41.255.150:6688/r/~wxr/OnPro into Dev-Branch --- HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs | 53 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 45 insertions(+), 8 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs index 60f9806..08bfede 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs @@ -1905,13 +1905,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) { @@ -1982,7 +1982,18 @@ btnConfrim.MouseUpEventHandler = (sender, e) => { - if (sceneFunction.localFunction.spk == SPK.GroupControl) { } + if (sceneFunction.localFunction.spk == SPK.GroupControl) { + var colorBegin = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.ColorfulBegin); + if (colorBegin != null) + { + sceneFunction.status.Remove(colorBegin); + } + var colorEnd = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.ColorfulEnd); + if (colorEnd != null) + { + sceneFunction.status.Remove(colorEnd); + } + } else { if (isOnStatus) @@ -3189,7 +3200,33 @@ /// <param name="btn"></param> void LoadEditDialog_CCT(SceneFunctionStatus trait, Button btn) { + if (trait.min == 0) + { + switch (trait.key) + { + case FunctionAttributeKey.SetTemp: + trait.min = 16; + break; + case FunctionAttributeKey.CCT: + trait.min = 2700; + break; + } + } + if (trait.max == 0) + { + switch (trait.key) + { + case FunctionAttributeKey.SetTemp: + trait.max = 30; + break; + case FunctionAttributeKey.CCT: + trait.max = 6500; + break; + } + } + double temp = trait.min; + double.TryParse(trait.value, out temp); trait.value = temp.ToString(); -- Gitblit v1.8.0