黄学彪
2020-01-09 fa6bcb2e9907772480f99205f36ec2a1ce735a22
ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs
@@ -27,7 +27,7 @@
        /// <summary>
        /// SeekBar
        /// </summary>
        public HorizontalSeekBar SeekBar;
        public DiyImageSeekBar SeekBar;
        /// <summary>
        /// SeekBarTitle
        /// </summary>
@@ -104,17 +104,20 @@
            };
            AddChidren(ClickButton);
            SeekBar = new HorizontalSeekBar()
            SeekBar = new DiyImageSeekBar()
            {
                X = Application.GetRealWidth(81),
                Y = Application.GetRealHeight(200),
                Width = Application.GetRealWidth(919),
                Height = Application.GetRealHeight(127),
                BackgroundColor = ZigbeeColor.Current.GXCSeekBarBackground,
                ProgressColor = ZigbeeColor.Current.GXCProgressColor,
                ThumbColor = ZigbeeColor.Current.GXCBackgroundColor,
                Max = MaxLevel,
                Progress = MaxLevel
                ProgressBarColor = ZigbeeColor.Current.GXCProgressColor,
                MaxValue = MaxLevel,
                Progress = MaxLevel,
                IsProgressTextShow = false,
                IsClickable = true,
                ThumbImageHeight=Application.GetMinRealAverage(80),
                SeekBarViewHeight=Application.GetRealHeight(6),
                ThumbImagePath="Item/SeekBarIcon.png"
            };
            AddChidren(SeekBar);
@@ -126,7 +129,8 @@
                Gravity = Gravity.CenterHorizontal,
                Text = $"{(int)(SeekBar.Progress * 1.0 / MaxLevel * 100)} %",
                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
                TextSize=12
                TextSize = 12,
                IsBold = true
            };
            AddChidren(SeekBarTitle);
@@ -166,11 +170,11 @@
            SelectBtn.Visible = statu;
            if(statu)
            {
                SetProgress(100);
                SetSeekBarProgress(SeekBar.Progress == 0 ? MaxLevel : SeekBar.Progress);
            }
            else
            {
                SetProgress(0);
                SetSeekBarProgress(0);
            }
        }
@@ -195,7 +199,7 @@
        /// SetProgress
        /// </summary>
        /// <param name="progress"></param>
        public void SetProgress(int progress)
        public void SetSeekBarProgress(int progress)
        {
            SeekBar.Progress = progress;
            SetSeekBarTitle();