黄学彪
2020-08-07 ec34983e291d1c85284472a27109d55891f9a6b5
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SeekBarControl.cs
@@ -11,7 +11,18 @@
    {
        #region ■ 变量声明___________________________
        private uint nowProgressBarColor = 0;
        /// <summary>
        /// 进度条可用时的背景色
        /// </summary>
        private uint ProgressBarEnableColor = 0;
        /// <summary>
        /// 进度条不可用时的背景色(默认灰色)
        /// </summary>
        public uint ProgressBarUnEnableColor = 0xffe8e8e8;
        /// <summary>
        /// 当前可用状态
        /// </summary>
        private bool nowEnable = true;
        /// <summary>
        /// 控件能否使用
        /// </summary>
@@ -19,16 +30,20 @@
        {
            set
            {
                //状态没有改变
                if (nowEnable == value) { return; }
                nowEnable = value;
                this.IsClickable = value;
                if (value == true)
                {
                    //原来的颜色
                    base.ProgressBarColor = nowProgressBarColor;
                    base.ProgressBarColor = ProgressBarEnableColor;
                }
                else
                {
                    //灰色
                    base.ProgressBarColor = 0xffe8e8e8;
                    base.ProgressBarColor = ProgressBarUnEnableColor;
                }
            }
        }
@@ -40,7 +55,7 @@
        {
            set
            {
                nowProgressBarColor = value;
                ProgressBarEnableColor = value;
                base.ProgressBarColor = value;
            }
        }
@@ -50,7 +65,7 @@
        /// </summary>
        public Action<int, int> ProgressChangedEvent = null;
        /// <summary>
        /// 进度条事件的触发时间间隔(默认没有间隔)
        /// 进度条事件的触发时间间隔(默认没有间隔,单位为毫秒)
        /// </summary>
        public int EventWaitTime = -1;
        /// <summary>
@@ -70,10 +85,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;