From 7f233a10afa6882b4d9531185af60e8843bc1af2 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 11 五月 2020 09:21:36 +0800 Subject: [PATCH] 20200511 --- HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs index 1513d35..a725456 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs @@ -108,7 +108,7 @@ if (curtain.openLevel > 1) { curtain.openLevel--; - controlBar.Progress = curtain.openLevel; + curtainSeekBar.Progress = controlBar.Progress = curtain.openLevel; delayTime = DateTime.Now; new System.Threading.Thread(() => { while(delayTime != DateTime.MaxValue) @@ -135,10 +135,10 @@ }; btnPlusSgnIcon.MouseDownEventHandler = (sender, e) => { - if (curtain.openLevel > 1) + if (curtain.openLevel < 100) { curtain.openLevel++; - controlBar.Progress = curtain.openLevel; + curtainSeekBar.Progress = controlBar.Progress = curtain.openLevel; delayTime = DateTime.Now; new System.Threading.Thread(() => { while (delayTime != DateTime.MaxValue) @@ -171,6 +171,18 @@ { delayTime = DateTime.Now; curtain.openLevel = e; + controlBar.Progress = e; + Control.Send(CommandType_A.write, curtain); + } + }; + + controlBar.OnProgressChangedEvent = (sender, e) => + { + if ((DateTime.Now - delayTime).TotalMilliseconds > 300) + { + delayTime = DateTime.Now; + curtain.openLevel = e; + curtainSeekBar.Progress = e; Control.Send(CommandType_A.write, curtain); } }; -- Gitblit v1.8.0