From 01b8b5bde8a58060bdd03b78a32747c5aa551976 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 01 十二月 2021 09:32:54 +0800
Subject: [PATCH] 111
---
HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
index 8b08cbb..bc1193d 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
@@ -62,11 +62,14 @@
/// </summary>
void LoadEvet_ChangeFadeTime()
{
- barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
+ if (function.GetAttribute(FunctionAttributeKey.FadeTime) != null)
{
- function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString());
- function.UpdataFuncitonInfo();
- };
+ barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
+ {
+ function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString());
+ function.SaveFunctionFile();
+ };
+ }
}
/// <summary>
@@ -94,7 +97,6 @@
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);
- function.SetAttrState(FunctionAttributeKey.FadeTime, barFadeTime.Progress);
btnBrightnessText.Text = dimmerBar.Progress + "%";
};
//20201223 鍒犻櫎婊戝姩鍙戦�佸懡浠わ紝闃叉鎺т欢璺冲姩
@@ -142,7 +144,6 @@
{
btnSwitch.MouseUpEventHandler += (sender, e) =>
{
- function.SetAttrState(FunctionAttributeKey.FadeTime, barFadeTime.Progress);
btnSwitch.IsSelected = !btnSwitch.IsSelected;
if (btnSwitch.IsSelected)
{
@@ -157,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