| | |
| | | /// <summary> |
| | | /// SeekBar |
| | | /// </summary> |
| | | public HorizontalSeekBar SeekBar; |
| | | public DiyImageSeekBar SeekBar; |
| | | /// <summary> |
| | | /// SeekBarTitle |
| | | /// </summary> |
| | |
| | | Height = Application.GetRealHeight(80), |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize=14 |
| | | }; |
| | | AddChidren(NameBtn); |
| | | |
| | |
| | | }; |
| | | 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); |
| | | |
| | |
| | | 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); |
| | | |
| | |
| | | public void SetStatu(bool statu) |
| | | { |
| | | SelectBtn.Visible = statu; |
| | | if(statu) |
| | | { |
| | | SetSeekBarProgress(SeekBar.Progress == 0 ? MaxLevel : SeekBar.Progress); |
| | | } |
| | | else |
| | | { |
| | | SetSeekBarProgress(0); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// SetProgress |
| | | /// </summary> |
| | | /// <param name="progress"></param> |
| | | public void SetProgress(int progress) |
| | | public void SetSeekBarProgress(int progress) |
| | | { |
| | | SeekBar.Progress = progress; |
| | | SetSeekBarTitle(); |