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/ColorTureLampPageBLL.cs | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
index 2bb7c7b..c5349dd 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
@@ -25,7 +25,7 @@
bodyView.dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1);
if (!bodyView.onDimmerBar)
{
- bodyView.dimmerBar.Progress = Convert.ToInt32( updataTemp.GetAttrState(FunctionAttributeKey.Brightness));
+ bodyView.dimmerBar.Progress = Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness));
}
bodyView.btnBrightnessText.Text = updataTemp.GetAttrState(FunctionAttributeKey.Brightness) + "%";
bodyView.btnBrightnessText.Y = ((100 - Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness))) * Application.GetRealHeight(222 - 16) / 100) + Application.GetRealWidth(80);
@@ -59,7 +59,8 @@
LoadEvet_ChangeFadeTime();
LoadEvet_ChangeColorTemplatrue();
//鍥為��鍒锋柊淇℃伅浜嬩欢
- actionRefresh = () => {
+ actionRefresh = () =>
+ {
btnFunctionName.Text = btnFunctionName_Out.Text = function.name;
btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = function.GetRoomListName();
//function.SaveFunctionData(true);
@@ -70,11 +71,14 @@
/// </summary>
void LoadEvet_ChangeFadeTime()
{
- //barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
- //{
- // function.fadeTime = e;
- // function.SaveFunctionData(true);
- //};
+ if (function.GetAttribute(FunctionAttributeKey.FadeTime) != null)
+ {
+ barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
+ {
+ function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString());
+ function.SaveFunctionFile();
+ };
+ }
}
/// <summary>
@@ -205,7 +209,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)
{
d.Add(FunctionAttributeKey.Brightness, function.lastBrightness.ToString());
--
Gitblit v1.8.0