From 301d3f15ba03ff942c029bd4c0b1ff544f7cfede Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期三, 30 十二月 2020 11:19:48 +0800 Subject: [PATCH] 2020-12-30 1.解决RGB灯,色盘ColorPicker部分安卓手机,刷新图片时会变小问题 --- HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs index 5dfd41c..d2817f3 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs @@ -20,7 +20,8 @@ return; if (uFunction.functionType == bodyView.light.functionType && uFunction.sid == bodyView.light.sid) { - + bodyView.btnBrightnessText.Text = uFunction.brightness + "%"; + bodyView.btnBrightnessText.Y = ((100 - uFunction.brightness) * Application.GetRealHeight(288 - 16 - 16) / 100) + Application.GetRealWidth(40); if (uFunction.trait_on_off.curValue.ToString() == "on") { bodyView.dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1); @@ -28,8 +29,6 @@ { bodyView.dimmerBar.Progress = uFunction.brightness; } - bodyView.btnBrightnessText.Text = uFunction.brightness + "%"; - bodyView.btnBrightnessText.Y = ((100 - uFunction.brightness) * Application.GetRealHeight(288 - 16 - 16) / 100) + Application.GetRealWidth(40); } else { @@ -66,7 +65,7 @@ barFadeTime.OnStopTrackingTouchEvent = (sender, e) => { light.fadeTime = e; - light.SaveFunctionData(true); + light.UpdataFuncitonInfo(); }; } @@ -97,10 +96,12 @@ d.Add(FunctionAttributeKey.Brightness, light.brightness.ToString()); Control.Ins.SendWriteCommand(light, d); light.fadeTime = barFadeTime.Progress; + btnBrightnessText.Text = dimmerBar.Progress + "%"; }; //20201223 鍒犻櫎婊戝姩鍙戦�佸懡浠わ紝闃叉鎺т欢璺冲姩 dimmerBar.OnProgressChangedEvent = (sender, e) => { + dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1); //light.fadeTime = 0; //if (!btnSwitch.IsSelected) //{ @@ -131,7 +132,7 @@ // } //} btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(288 - 16 - 16) / 100) + Application.GetRealWidth(40); - btnBrightnessText.Text = light.brightness + "%"; + btnBrightnessText.Text = dimmerBar.Progress + "%"; }; } -- Gitblit v1.8.0