From fb49279fd0e36e1ed2bd7332eecee9f963c13649 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期日, 20 十二月 2020 19:33:29 +0800
Subject: [PATCH] 20201220-1

---
 HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
old mode 100755
new mode 100644
index 3ac7385..d973bd2
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
@@ -64,7 +64,7 @@
         /// </summary>
         void LoadEvet_ChangeFadeTime()
         {
-            barFadeTime.OnProgressChangedEvent = (sender, e) =>
+            barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
             {
                 light.fadeTime = e;
                 light.SaveFunctionData(true);
@@ -78,8 +78,19 @@
         {
             barColorTemplatrue.OnProgressChangedEvent += (sender, value) =>
             {
-                //璁剧疆鑷畾涔夌殑鏂囨湰
-                barColorTemplatrue.SetCustomText(value * 100 + "K");
+                new System.Threading.Thread(() =>
+                {
+                    Application.RunOnMainThread(() =>
+                    {
+                        //璁剧疆鑷畾涔夌殑鏂囨湰
+                        barColorTemplatrue.SetCustomText(value * 100 + "K");
+                        light.Attr_CCT.curValue = value * 100;
+                        System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+                        d.Add(FunctionAttributeKey.CCT, light.Attr_CCT.curValue.ToString());
+                        Control.Ins.SendWriteCommand(light, d);
+                    });
+                    System.Threading.Thread.Sleep(200);
+                }).Start();
             };
         }
 
@@ -123,7 +134,6 @@
 
                 if (e == 0 || e == 100)
                 {
-                    //Control.Send(CommandType_A.write, this.light);
                     System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                     d.Add(FunctionAttributeKey.Brightness, light.brightness.ToString());
                     Control.Ins.SendWriteCommand(light, d);

--
Gitblit v1.8.0