From b5f1a194d354ba9b2587c59ae17cf38d0f7f9bac Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 13 十二月 2021 16:38:23 +0800
Subject: [PATCH] 二维码闪退问题
---
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