From b186c02eb9e44268727b769be477d1956e97fbb0 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期四, 02 一月 2020 09:08:05 +0800
Subject: [PATCH] 2019.1.2
---
ZigbeeApp/Shared/Phone/Device/Curtain/RollerShadeControl.cs | 61 ++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 1 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Curtain/RollerShadeControl.cs b/ZigbeeApp/Shared/Phone/Device/Curtain/RollerShadeControl.cs
index 594075f..f489595 100644
--- a/ZigbeeApp/Shared/Phone/Device/Curtain/RollerShadeControl.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Curtain/RollerShadeControl.cs
@@ -80,6 +80,15 @@
/// </summary>
public bool IsDrawerLockMode;
+ /// <summary>
+ /// ProgressBtn
+ /// </summary>
+ Button ProgressBtn;
+ /// <summary>
+ /// ProgressBtnY
+ /// </summary>
+ int ProgressBtnY;
+
#endregion
#region 鈼� 鎺ュ彛___________________________
@@ -695,11 +704,36 @@
curtainRollSeekBar.Gravity = Gravity.CenterHorizontal;
curtainRollSeekBar.Progress = (device.CommonDevice as Rollershade).WcdCurrentPositionLiftPercentage;
layout.AddChidren(curtainRollSeekBar);
-
+ curtainRollSeekBar.IsProgressTextShow = false;
+ curtainRollSeekBar.CurtainPaddingTop = Application.GetRealHeight(110);
curtainRollSeekBar.OnStopTrackingTouchEvent += (sender, e) =>
{
(device.CommonDevice as Rollershade).WcdGoToTiltValue(curtainRollSeekBar.Progress);
};
+
+ curtainRollSeekBar.OnStartTrackingTouchEvent += (sender, e) =>
+ {
+ OnProgressButtonMove(curtainRollSeekBar.Progress);
+ ProgressBtn.Visible = true;
+ };
+
+ curtainRollSeekBar.OnStopTrackingTouchEvent += (sender, e) =>
+ {
+ ProgressBtn.Visible = false;
+ };
+
+ curtainRollSeekBar.OnProgressChangedEvent += (send2, e2) =>
+ {
+
+ OnProgressButtonMove(e2);
+
+ //鍒ゆ柇鏄惁300ms灞忚斀
+ //if (curtainRollSeekBar.IsProgressChangeDelay()) return;
+
+ //(device.CommonDevice as Rollershade).WcdGoToTiltValue(curtainRollSeekBar.Progress);
+ };
+
+ InitProgressBtn(layout);
}
else
{
@@ -717,7 +751,32 @@
}
}
+ /// <summary>
+ /// 娣诲姞杩涘害鎸夐挳
+ /// </summary>
+ private void InitProgressBtn(FrameLayout layout)
+ {
+ ProgressBtnY = curtainRollSeekBar.Y - Application.GetMinReal(204);
+ ProgressBtn = new Button()
+ {
+ Y = ProgressBtnY,
+ Width = Application.GetMinReal(135),
+ Height = Application.GetMinReal(104),
+ UnSelectedImagePath = "Item/ProgressBubbles.png",
+ Visible = false,
+ Gravity = Gravity.CenterHorizontal
+ };
+ layout.AddChidren(ProgressBtn);
+ }
+ /// <summary>
+ /// OnProgressButtonMove
+ /// </summary>
+ private void OnProgressButtonMove(int mProgress)
+ {
+ ProgressBtn.Y = ProgressBtnY + curtainRollSeekBar.NowProgressY;
+ ProgressBtn.Text = mProgress + "%";
+ }
#endregion
--
Gitblit v1.8.0