From 6d73bf6e816570291865674bef8bce8972e4de3f Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期三, 01 十二月 2021 16:32:57 +0800 Subject: [PATCH] 2021-12-01-01 --- HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs index 1168eb2..bc1193d 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs @@ -62,7 +62,14 @@ /// </summary> void LoadEvet_ChangeFadeTime() { - + if (function.GetAttribute(FunctionAttributeKey.FadeTime) != null) + { + barFadeTime.OnStopTrackingTouchEvent = (sender, e) => + { + function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString()); + function.SaveFunctionFile(); + }; + } } /// <summary> @@ -87,7 +94,6 @@ dimmerBar.OnStopTrackingTouchEvent = (sender, e) => { onDimmerBar = false; function.SetAttrState(FunctionAttributeKey.Brightness, dimmerBar.Progress); - function.SetAttrState(FunctionAttributeKey.FadeTime, barFadeTime.Progress); System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); d.Add(FunctionAttributeKey.Brightness, dimmerBar.Progress.ToString()); Control.Ins.SendWriteCommand(function, d); @@ -138,7 +144,6 @@ { btnSwitch.MouseUpEventHandler += (sender, e) => { - function.SetAttrState(FunctionAttributeKey.FadeTime, barFadeTime.Progress); btnSwitch.IsSelected = !btnSwitch.IsSelected; if (btnSwitch.IsSelected) { @@ -153,7 +158,6 @@ function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off"; System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString()); - d.Add(FunctionAttributeKey.FadeTime, function.GetAttrState(FunctionAttributeKey.FadeTime)); if (btnSwitch.IsSelected) { if(function.lastBrightness == 0) -- Gitblit v1.8.0