From 84e76cf2fcbe26142750131d3c27eaac0335e40a Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 11 三月 2021 11:04:08 +0800
Subject: [PATCH] 上传一个添加红外宝 Ios 版本
---
HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs | 51 ++++++++++++++++++++++++++++++++-------------------
1 files changed, 32 insertions(+), 19 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs
index df8ab1c..1a9040b 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,9 +121,14 @@
Height = Application.GetMinRealAverage(40),
SelectedImagePath = "Collection/CollectionIcon.png",
UnSelectedImagePath = "Collection/CollectionGrayIcon.png",
- IsSelected = light.collection
+ IsSelected = light.collect
};
- controlView.AddChidren(btnCollection);
+ //controlView.AddChidren(btnCollection);
+ //2020-12-16 濡傛灉鏄垚鍛橀殣钘忔敹钘忓姛鑳�
+ if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare)
+ {
+ controlView.AddChidren(btnCollection);
+ }
dimmerBar = new WaveSeekBarOn()
{
@@ -127,19 +136,14 @@
Y = Application.GetRealHeight(74 + 16),
Width = Application.GetRealWidth(168 - 40),
Height = Application.GetRealHeight(288 - 16 - 16),
- //WaveBorderColor = CSS_Color.PromptingColor2,
BorderColor = 0x00000000,
- CornerRadius = Application.GetRealWidth(40),
+ CornerRadius = Application.GetRealWidth(30),
BorderWidth = 0,
- //WavePadding = Application.GetRealWidth(-5),
- //BackgroundColor = CSS_Color.BackgroundColor,
- //Radius = (uint)Application.GetRealWidth(40),
Progress = light.brightness,
- //ProgressTextColor =0x00000000,
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,10 +162,8 @@
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
Text = light.brightness + "%",
- BackgroundColor = 0xFF000FFF
};
controlView.AddChidren(btnBrightnessText);
-
#region 娓愬彉鏃堕棿璋冭妭
var btnGradualChangeText = new Button()
@@ -174,6 +176,8 @@
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
TextID = StringId.SpeedOfChange,
+ Visible = light.HadFadeTime,
+ Enable = light.HadFadeTime,
};
controlView.AddChidren(btnGradualChangeText);
@@ -187,10 +191,12 @@
TextAlignment = TextAlignment.CenterLeft,
TextColor = CSS_Color.PromptingColor1,
TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ Visible = light.HadFadeTime,
+ Enable = light.HadFadeTime,
};
controlView.AddChidren(btnGradualChangeMinValuesText);
- var barGradualChange = new DiyImageSeekBar()
+ barFadeTime = new DiyImageSeekBar()
{
X = btnGradualChangeMinValuesText.Right,
Y = Application.GetRealHeight(412 - 21) + Application.GetRealHeight(8),
@@ -204,14 +210,16 @@
ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel,
ProgressBarUnitSring = "s",
MaxValue = 10,
- Progress = 0,
+ Progress = light.fadeTime,
SeekBarPadding = Application.GetRealWidth(20),
+ Visible = light.HadFadeTime,
+ Enable = light.HadFadeTime,
};
- 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),
@@ -219,6 +227,8 @@
TextAlignment = TextAlignment.CenterLeft,
TextColor = CSS_Color.PromptingColor1,
TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ Visible = light.HadFadeTime,
+ Enable = light.HadFadeTime,
};
controlView.AddChidren(btnGradualChangeMaxValuesText);
#endregion
@@ -231,15 +241,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