From 47fbfe1cd58bb82b45dfc0a5398799bd856b1fb0 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期四, 25 十一月 2021 11:45:12 +0800
Subject: [PATCH] 2021-11-25=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