From 5eeafe3af80bfd88306bd8ad9e76c8f4b51ca35f Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期四, 17 十二月 2020 14:16:20 +0800
Subject: [PATCH] 增加本地发送的重发机制
---
HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs | 28 +++++++++++++++++-----------
1 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs
index df8ab1c..d87f2d4 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs
@@ -35,6 +35,10 @@
/// </summary>
Button btnBrightnessText;
/// <summary>
+ /// 娓愬彉鏃堕棿淇敼
+ /// </summary>
+ DiyImageSeekBar barFadeTime;
+ /// <summary>
/// 寮�鍏虫寜閽�
/// </summary>
Button btnSwitch;
@@ -117,7 +121,7 @@
Height = Application.GetMinRealAverage(40),
SelectedImagePath = "Collection/CollectionIcon.png",
UnSelectedImagePath = "Collection/CollectionGrayIcon.png",
- IsSelected = light.collection
+ IsSelected = light.collect
};
controlView.AddChidren(btnCollection);
@@ -139,7 +143,7 @@
IsProgressTextShow = false,
};
controlView.AddChidren(dimmerBar);
- if(light.trait_on_off.value.ToString() == "on")
+ if(light.trait_on_off.curValue.ToString() == "on")
{
dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1);
}
@@ -158,7 +162,6 @@
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
Text = light.brightness + "%",
- BackgroundColor = 0xFF000FFF
};
controlView.AddChidren(btnBrightnessText);
@@ -190,7 +193,7 @@
};
controlView.AddChidren(btnGradualChangeMinValuesText);
- var barGradualChange = new DiyImageSeekBar()
+ barFadeTime = new DiyImageSeekBar()
{
X = btnGradualChangeMinValuesText.Right,
Y = Application.GetRealHeight(412 - 21) + Application.GetRealHeight(8),
@@ -204,14 +207,14 @@
ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel,
ProgressBarUnitSring = "s",
MaxValue = 10,
- Progress = 0,
+ Progress = light.fadeTime,
SeekBarPadding = Application.GetRealWidth(20),
};
- controlView.AddChidren(barGradualChange);
+ controlView.AddChidren(barFadeTime);
var btnGradualChangeMaxValuesText = new Button()
{
- X = barGradualChange.Right,
+ X = barFadeTime.Right,
Y = btnGradualChangeText.Bottom + Application.GetRealHeight(8),
Width = Application.GetRealWidth(35),
Height = Application.GetRealHeight(21),
@@ -231,15 +234,18 @@
Height = Application.GetMinRealAverage(40),
UnSelectedImagePath = "Public/PowerClose.png",
SelectedImagePath = "Public/PowerOpen.png",
- IsSelected = light.trait_on_off.value.ToString() == "on",
- //Tag =
+ IsSelected = light.trait_on_off.curValue.ToString() == "on",
};
controlView.AddChidren(btnSwitch);
LoadEventList();
- new TopViewDiv(bodyView, Language.StringByID(StringId.Lights)).LoadTopView(light, actionRefresh);
-
+ new TopViewDiv(bodyView, Language.StringByID(StringId.Lights)).LoadTopView_FunctionTop(light, actionRefresh);
+ new System.Threading.Thread(() =>
+ {
+ DriverLayer.Control.Ins.SendReadCommand(light);
+ })
+ { IsBackground = true }.Start();
}
--
Gitblit v1.8.0