From 2450c12c825ad4d78d1572da2fa421706db2df2f Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 18 六月 2020 16:01:14 +0800 Subject: [PATCH] 新代码 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SeekBarControl.cs | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SeekBarControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SeekBarControl.cs index 3af1925..1882d5f 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SeekBarControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SeekBarControl.cs @@ -49,6 +49,14 @@ /// 杩涘害鍊兼敼鍙�,濡傛灉瑕佽缃垵濮嬭繘搴﹀��,姝ゅ彉閲忚鍦ㄨ缃垵濮嬭繘搴﹀�间箣鍓嶈繘琛岃缃�(绗竴涓弬鏁�0:婊戝姩鐨勬椂鍊�,1:鎵嬫寚寮硅捣鐨勬椂鍊�) /// </summary> public Action<int, int> ProgressChangedEvent = null; + /// <summary> + /// 杩涘害鏉′簨浠剁殑瑙﹀彂鏃堕棿闂撮殧(榛樿娌℃湁闂撮殧,鍗曚綅涓烘绉�) + /// </summary> + public int EventWaitTime = -1; + /// <summary> + /// 鍓嶅洖鏃堕棿 + /// </summary> + private DateTime oldTime = DateTime.Now; #endregion @@ -62,10 +70,14 @@ { this.Width = Application.GetRealWidth(i_width); this.Height = Application.GetRealHeight(84); + //鍦嗙悆鐨勫搴� this.ThumbImageHeight = Application.GetRealHeight(84); this.ThumbImagePath = "Item/SeekBarIcon.png"; + //杩涘害鏉$殑瀹藉害 this.SeekBarViewHeight = Application.GetRealHeight(10); + //杩涘害鏉¤儗鏅壊 this.SeekBarBackgroundColor = 0xfff5f5f5; + //涓婃柟鏄惁鏄剧ず鏂囨湰 this.IsProgressTextShow = false; this.MaxValue = 100; this.Gravity = Gravity.CenterHorizontal; @@ -92,6 +104,13 @@ this.OnProgressChangedEvent -= this.MyProgressChangedEvent; return; } + //鏃堕棿闂撮殧 + if (EventWaitTime != -1) + { + if ((DateTime.Now - oldTime).TotalMilliseconds < EventWaitTime) { return; } + oldTime = DateTime.Now; + } + this.ProgressChangedEvent(0, value); } @@ -107,6 +126,7 @@ this.OnStopTrackingTouchEvent -= this.MyStopTrackingTouchEvent; return; } + //寮硅捣浜嬩欢涓嶉渶瑕佸垽鏂椂闂� this.ProgressChangedEvent(1, value); } -- Gitblit v1.8.0