From 94e4e5b9fd3da964c44b7b14227d6fe2bbb426d7 Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期四, 02 四月 2020 13:56:39 +0800
Subject: [PATCH] 2020-04-02-2
---
ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs | 38 ++++++++++++++++++++++++++------------
1 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs
index b1dce70..c6c8597 100755
--- 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);
@@ -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();
--
Gitblit v1.8.0