From 53189866ba4012fec0b40990fd2281b836fa2668 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 01 七月 2020 16:29:16 +0800 Subject: [PATCH] 20200701 --- HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs index c6e918d..43a42ef 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs @@ -168,17 +168,13 @@ curtainSeekBar.OnProgressChangedEvent = (sender, e) => { - delayTime = DateTime.Now; new System.Threading.Thread(() => { - while (delayTime != DateTime.MaxValue) + if ((DateTime.Now - delayTime).TotalMilliseconds > 300) { - System.Threading.Thread.Sleep(100); - if ((DateTime.Now - delayTime).TotalSeconds > 1) - { - curtain.openLevel = e; - Control.Send(CommandType_A.write, curtain); - } + delayTime = DateTime.Now; + curtain.openLevel = e; + Control.Send(CommandType_A.write, curtain); } }) { IsBackground = true }.Start(); -- Gitblit v1.8.0