| | |
| | | /// </summary> |
| | | public bool IsDrawerLockMode; |
| | | |
| | | /// <summary> |
| | | /// ProgressBtn |
| | | /// </summary> |
| | | Button ProgressBtn; |
| | | /// <summary> |
| | | /// ProgressBtnY |
| | | /// </summary> |
| | | int ProgressBtnY; |
| | | |
| | | #endregion |
| | | |
| | | #region ◆ 接口___________________________ |
| | |
| | | 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 |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | /// <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 |
| | | |