From d07d62be7111d78b2aaa44c9cdee23a7d22b4dda Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期二, 22 十二月 2020 10:38:15 +0800 Subject: [PATCH] 20201222-1 --- HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs | 35 +++++++++++++++++++++++------------ 1 files changed, 23 insertions(+), 12 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs old mode 100644 new mode 100755 index df8ab1c..bf0f284 --- 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() { @@ -139,7 +148,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 +167,6 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, Text = light.brightness + "%", - BackgroundColor = 0xFF000FFF }; controlView.AddChidren(btnBrightnessText); @@ -190,7 +198,7 @@ }; controlView.AddChidren(btnGradualChangeMinValuesText); - var barGradualChange = new DiyImageSeekBar() + barFadeTime = new DiyImageSeekBar() { X = btnGradualChangeMinValuesText.Right, Y = Application.GetRealHeight(412 - 21) + Application.GetRealHeight(8), @@ -204,14 +212,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 +239,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