From a7d20263f28aa009ef8e064a7f9700d7cd642492 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期三, 10 六月 2020 10:06:47 +0800
Subject: [PATCH] 2020-06-10-1
---
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