From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期五, 28 二月 2020 15:25:13 +0800 Subject: [PATCH] 2020.2.28 --- ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs | 34 ++++++++++++++++++++-------------- 1 files changed, 20 insertions(+), 14 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs index d32c138..c6c8597 100644 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs +++ b/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); @@ -164,11 +170,11 @@ SelectBtn.Visible = statu; if(statu) { - SetProgress(100); + SetSeekBarProgress(SeekBar.Progress == 0 ? MaxLevel : SeekBar.Progress); } else { - SetProgress(0); + SetSeekBarProgress(0); } } @@ -193,7 +199,7 @@ /// SetProgress /// </summary> /// <param name="progress"></param> - public void SetProgress(int progress) + public void SetSeekBarProgress(int progress) { SeekBar.Progress = progress; SetSeekBarTitle(); -- Gitblit v1.8.0