From 3dcbd186c42c598c0c08d1cd37034cf2baa09e54 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 30 十二月 2019 15:47:51 +0800
Subject: [PATCH] 合并了代码

---
 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 c60af98..5d4d399 100755
--- 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