From 024703246120fee33e2f6c2f662383f1facdecd2 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 14 四月 2022 15:35:00 +0800
Subject: [PATCH] 2022年04月14日15:34:55
---
HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs | 48 +++++++++++++++++++++++++++++++-----------------
1 files changed, 31 insertions(+), 17 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
index bc1193d..c64dfcd 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
@@ -88,21 +88,25 @@
/// </summary>
void LoadEvent_DimmerBar()
{
- dimmerBar.OnStartTrackingTouchEvent = (sender, e) => {
- onDimmerBar = true;
- };
- dimmerBar.OnStopTrackingTouchEvent = (sender, e) => {
- onDimmerBar = false;
- 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());
- Control.Ins.SendWriteCommand(function, d);
- btnBrightnessText.Text = dimmerBar.Progress + "%";
- };
- //20201223 鍒犻櫎婊戝姩鍙戦�佸懡浠わ紝闃叉鎺т欢璺冲姩
- dimmerBar.OnProgressChangedEvent = (sender, e) =>
+ //if (function.online)
{
- dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1);
+ dimmerBar.OnStartTrackingTouchEvent = (sender, e) =>
+ {
+ onDimmerBar = true;
+ };
+ dimmerBar.OnStopTrackingTouchEvent = (sender, e) =>
+ {
+ onDimmerBar = false;
+ 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());
+ 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)
//{
@@ -133,10 +137,10 @@
// }
//}
btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(288 - 16 - 16) / 100) + Application.GetRealWidth(40);
- btnBrightnessText.Text = dimmerBar.Progress + "%";
- };
+ btnBrightnessText.Text = dimmerBar.Progress + "%";
+ };
+ }
}
-
/// <summary>
/// 鍔犺浇寮�鍏充簨浠�
/// </summary>
@@ -144,6 +148,16 @@
{
btnSwitch.MouseUpEventHandler += (sender, e) =>
{
+ //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)
{
--
Gitblit v1.8.0