From a59663c4981c498f007307f7115f6850ab73e239 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 21 七月 2023 21:06:51 +0800
Subject: [PATCH] 群控界面修复  1.9版本bug修复

---
 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