From fa6bcb2e9907772480f99205f36ec2a1ce735a22 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 09 一月 2020 14:11:07 +0800
Subject: [PATCH] 合并代码
---
ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs | 26 +++++++++++++++-----------
1 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs
index 0d6a763..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>
@@ -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();
--
Gitblit v1.8.0