From 59e221cdb1ba8a666f68c5a2014e59e6f1870b43 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 30 六月 2022 13:43:53 +0800
Subject: [PATCH] Merge branch 'release0123' into V1.5.9
---
HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs | 33 ++++++++++++++++-----------------
1 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
index 519aec2..c724edb 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
@@ -90,7 +90,7 @@
/// </summary>
void LoadEvent_DimmerBar()
{
- //if (function.online)
+ if (function.online)
{
dimmerBar.OnStartTrackingTouchEvent = (sender, e) =>
{
@@ -104,10 +104,10 @@
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");
- }
+ //if(dimmerBar.Progress > 0)
+ //{
+ // d.Add(FunctionAttributeKey.OnOff, "on");
+ //}
Control.Ins.SendWriteCommand(function, d);
btnBrightnessText.Text = dimmerBar.Progress + "%";
};
@@ -131,7 +131,7 @@
}
else
{
- if (500 < (DateTime.Now - function.refreshTime).TotalMilliseconds)
+ if (350 < (DateTime.Now - function.refreshTime).TotalMilliseconds)
{
function.refreshTime = DateTime.Now;
new System.Threading.Thread(() =>
@@ -155,16 +155,16 @@
{
btnSwitch.MouseUpEventHandler += (sender, e) =>
{
- //if (!function.online)
- //{
- // 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)
{
@@ -179,7 +179,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