From efcffde735fa65ae34bae0bcc86313b74ed0e36c Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 20 五月 2024 13:47:38 +0800 Subject: [PATCH] 优化离线数据 --- HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs | 34 ++++++++++++++++++++++++++++------ 1 files changed, 28 insertions(+), 6 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs index 52f25af..741453a 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs @@ -81,7 +81,7 @@ controlView = new FrameLayout() { Gravity = Gravity.CenterHorizontal, - Y = Application.GetRealHeight(88), + Y = Application.GetRealHeight(88 + 10), Width = Application.GetRealWidth(327), Height = Application.GetRealHeight(526), BackgroundImagePath = "Public/Fragmentbg.png", @@ -220,11 +220,6 @@ Enable = function.GetAttribute(FunctionAttributeKey.FadeTime) != null, }; controlView.AddChidren(barFadeTime); - barFadeTime.OnStopTrackingTouchEvent = (sender, e) => - { - function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString()); - function.UpdataFuncitonInfo(); - }; var btnGradualChangeMaxValuesText = new Button() { @@ -262,9 +257,36 @@ DriverLayer.Control.Ins.SendReadCommand(function); }) { IsBackground = true }.Start(); + + + new System.Threading.Thread(() => { + while (true) + { + System.Threading.Thread.Sleep(2000); + if (curDimmerStatus) + { + continue; + } + if (onDimmerBar) + { + onDimmerBar = false; + continue; + } + else + { + DriverLayer.Control.Ins.SendReadCommand(function); + curDimmerStatus = true; + } + } + }) + { IsBackground = true }.Start(); + } } + + + } -- Gitblit v1.8.0