From 32ad85a377b00bc54ad7f15a45d7631d3e2b10d5 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期一, 13 六月 2022 17:41:12 +0800
Subject: [PATCH] 2022年06月13日17:39:46
---
HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs | 30 ++++++++++++++++++------------
1 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
index 4b989e4..3205232 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
@@ -88,11 +88,12 @@
/// </summary>
void LoadEvent_DimmerBar()
{
- if (function.online2d)
+ //if (function.online)
{
dimmerBar.OnStartTrackingTouchEvent = (sender, e) =>
{
onDimmerBar = true;
+ dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1);
};
dimmerBar.OnStopTrackingTouchEvent = (sender, e) =>
{
@@ -100,13 +101,17 @@
function.SetAttrState(FunctionAttributeKey.Brightness, dimmerBar.Progress);
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add(FunctionAttributeKey.Brightness, dimmerBar.Progress.ToString());
+ if(dimmerBar.Progress > 0)
+ {
+ d.Add(FunctionAttributeKey.OnOff, "on");
+ }
Control.Ins.SendWriteCommand(function, d);
btnBrightnessText.Text = dimmerBar.Progress + "%";
};
//20201223 鍒犻櫎婊戝姩鍙戦�佸懡浠わ紝闃叉鎺т欢璺冲姩
dimmerBar.OnProgressChangedEvent = (sender, e) =>
{
- dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1);
+
//function.fadeTime = 0;
//if (!btnSwitch.IsSelected)
//{
@@ -148,16 +153,16 @@
{
btnSwitch.MouseUpEventHandler += (sender, e) =>
{
- if (!function.online2d)
- {
- new Tip()
- {
- CloseTime = 1,
- Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
- Direction = AMPopTipDirection.None,
- }.Show(MainPage.BaseView);
- return;
- }
+ //if (!function.online)
+ //{
+ // new Tip()
+ // {
+ // CloseTime = 1,
+ // Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ // Direction = AMPopTipDirection.None,
+ // }.Show(MainPage.BaseView);
+ // return;
+ //}
btnSwitch.IsSelected = !btnSwitch.IsSelected;
if (btnSwitch.IsSelected)
{
@@ -172,6 +177,7 @@
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