From 6d73bf6e816570291865674bef8bce8972e4de3f Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期三, 01 十二月 2021 16:32:57 +0800 Subject: [PATCH] 2021-12-01-01 --- HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs index a1a2aa8..775b792 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs @@ -26,10 +26,14 @@ //bodyView.btnCurtainClose.IsSelected = percent == 0; try { - if (!bodyView.onCurtainAnimation) - { - bodyView.CurtainAnimation(Convert.ToInt32(updateTemp.GetAttrState(FunctionAttributeKey.Percent))); - } + var progress = Convert.ToInt32(updateTemp.GetAttrState(FunctionAttributeKey.Percent)); + bodyView.curtainSeekBar.Progress = progress; + bodyView.btnProgress.Text = progress + "%"; + + //if (!bodyView.onCurtainAnimation) + //{ + // bodyView.CurtainAnimation(Convert.ToInt32(updateTemp.GetAttrState(FunctionAttributeKey.Percent))); + //} } catch { } } @@ -61,24 +65,24 @@ { if (runningDirection) { - if (curtainSeekBar.Progress + 10 > progress) + if (curtainSeekBar.Progress + 5 > progress) { curtainSeekBar.Progress = progress; } else { - curtainSeekBar.Progress = curtainSeekBar.Progress + 10; + curtainSeekBar.Progress = curtainSeekBar.Progress + 5; } } else { - if (curtainSeekBar.Progress - 10 < progress) + if (curtainSeekBar.Progress - 5 < progress) { curtainSeekBar.Progress = progress; } else { - curtainSeekBar.Progress = curtainSeekBar.Progress - 10; + curtainSeekBar.Progress = curtainSeekBar.Progress - 5; } } curBarProgress = curtainSeekBar.Progress; @@ -148,7 +152,7 @@ System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString()); DriverLayer.Control.Ins.SendWriteCommand(function, d); - CurtainAnimation(0); + //CurtainAnimation(100); }; btnCurtainStop.MouseUpEventHandler = (sender, e) => @@ -183,7 +187,7 @@ System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString()); DriverLayer.Control.Ins.SendWriteCommand(function, d); - CurtainAnimation(100); + //CurtainAnimation(0); }; //btnMinusSignIcon.MouseUpEventHandler = (sender, e) => -- Gitblit v1.8.0