gxc
2020-02-28 66a9965c44ecc32a6696abca876ab9d1cd091584
ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs
@@ -27,7 +27,7 @@
        /// <summary>
        /// SeekBar
        /// </summary>
        public HorizontalSeekBar SeekBar;
        public DiyImageSeekBar SeekBar;
        /// <summary>
        /// SeekBarTitle
        /// </summary>
@@ -84,6 +84,7 @@
                Height = Application.GetRealHeight(80),
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize=14
            };
            AddChidren(NameBtn);
@@ -103,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);
@@ -124,17 +128,19 @@
                Width = Application.GetRealWidth(200),
                Gravity = Gravity.CenterHorizontal,
                Text = $"{(int)(SeekBar.Progress * 1.0 / MaxLevel * 100)} %",
                TextColor = ZigbeeColor.Current.GXCTextGrayColor
                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
                TextSize = 12,
                IsBold = true
            };
            AddChidren(SeekBarTitle);
            line = new Button()
            {
                X = Application.GetRealWidth(81),
                Y = this.Height - 2,
                Y = this.Height - 1,
                Width = Application.GetRealWidth(919),
                Height = 2,
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor,
                Height = 1,
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2,
            };
            AddChidren(line);
@@ -162,6 +168,14 @@
        public void SetStatu(bool statu)
        {
            SelectBtn.Visible = statu;
            if(statu)
            {
                SetSeekBarProgress(SeekBar.Progress == 0 ? MaxLevel : SeekBar.Progress);
            }
            else
            {
                SetSeekBarProgress(0);
            }
        }
        /// <summary>
@@ -185,7 +199,7 @@
        /// SetProgress
        /// </summary>
        /// <param name="progress"></param>
        public void SetProgress(int progress)
        public void SetSeekBarProgress(int progress)
        {
            SeekBar.Progress = progress;
            SetSeekBarTitle();