黄学彪
2020-09-18 c7df85937f73fb347ee0b19e9c052d2d00a6df6c
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressRowBar.cs
@@ -12,6 +12,10 @@
        #region ■ 变量声明___________________________
        /// <summary>
        /// 进度条能否往回走(默认可以)
        /// </summary>
        public bool ProgressBarGoback = true;
        /// <summary>
        /// 会移动的进度条
        /// </summary>
        private FrameLayout btnProgressBar = null;
@@ -31,6 +35,22 @@
        /// 模式区分
        /// </summary>
        private int m_ModeDiv = -1;
        /// <summary>
        /// 进度条是否可视
        /// </summary>
        public new bool Visible
        {
            get { return base.Visible; }
            set
            {
                if (this.frameProgressBack != null)
                {
                    this.frameProgressBack.Visible = value;
                }
                base.Visible = value;
            }
        }
        #endregion
@@ -139,14 +159,16 @@
        /// <param name="value"></param>
        private void SetValueEx(decimal value)
        {
            if (btnProgressBar == null || this.m_ModeDiv != 1 || value > 1)
            if (btnProgressBar == null || this.m_ModeDiv != 1)
            {
                return;
            }
            if (value > 1) { value = 1; }
            HdlThreadLogic.Current.RunMain(() =>
            {
                int width = (int)(value * this.Width);
                if (btnProgressBar.Width >= width)
                if (this.ProgressBarGoback == false && btnProgressBar.Width >= width)
                {
                    //不能让进度条往回走
                    return;
@@ -157,7 +179,7 @@
                    //文本显示
                    btnProgressTextView.Text = ((int)(value * 100)) + "%";
                    //文本显示的那个图片框移动
                    this.frameProgressBack.X = ControlCommonResourse.XXLeft + btnProgressBar.Right - frameProgressBack.Width / 2;
                    this.frameProgressBack.X = this.X + btnProgressBar.Right - frameProgressBack.Width / 2;
                }
            });
        }