From 80075a89316729927db0ad65ca7674f81a942a93 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期三, 26 七月 2023 09:22:41 +0800 Subject: [PATCH] Merge branch 'Dev-Branch' into wjc --- HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 51 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 3593598..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) @@ -2053,6 +2064,7 @@ void UpdataFunctionRow() { + contentView.RemoveAll(); for (var i =0;i< functionRowList.Count; i++) { try @@ -2064,6 +2076,11 @@ { if (view.Tag != null) { + if (view.Tag.ToString() == FunctionAttributeKey.OnOff) + { + contentView.AddChidren(view); + + } if (isOnStatus) { if (view.Tag.ToString() != FunctionAttributeKey.OnOff) @@ -3183,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