From 6d3ba9484472d090532434e53667c096652149ce Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 25 九月 2020 09:56:14 +0800
Subject: [PATCH] 202009251

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

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
index 4f4e38d..af3fca6 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
@@ -42,6 +42,7 @@
             LoadSwitchEvent();
             LoadEvent_BackCenterColor();
             LoadEvent_DimmerBar();
+            LoadEvet_ChangeFadeTime();
             //鍥為��鍒锋柊淇℃伅浜嬩欢
             actionRefresh = () => {
                 btnFunctionName.Text = btnFunctionName_Out.Text = light.name;
@@ -102,9 +103,11 @@
                 System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                 d.Add("brightness", light.brightness.ToString());
                 Control.SendWriteCommand(light, d);
+                light.fadeTime = barFadeTime.Progress;
                 //Control.Send(CommandType_A.write, light);
             };
             dimmerBar.OnProgressChangedEvent = (sender, e) => {
+                light.fadeTime = 0;
                 if (!btnSwitch.IsSelected)
                 {
                     dimmerBar.ProgressBarColor = CSS.CSS_Color.AuxiliaryColor1;
@@ -143,6 +146,17 @@
         }
 
         /// <summary>
+        /// 淇敼鐏厜娓愬彉鏃堕棿
+        /// </summary>
+        void LoadEvet_ChangeFadeTime()
+        {
+            barFadeTime.OnProgressChangedEvent = (sender, e) =>
+            {
+                light.fadeTime = e;
+                light.SaveFunctionData();
+            };
+        }
+        /// <summary>
         /// 鍔犺浇寮�鍏充簨浠�
         /// </summary>
         void LoadSwitchEvent()

--
Gitblit v1.8.0