From af4101b1d8461331bc3163b738fc75d4bf67c85c Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 28 七月 2020 17:47:44 +0800
Subject: [PATCH] 2020-07-28-1
---
Shared.IOS/UI/WaveSeekBar.cs | 59 ++++++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 42 insertions(+), 17 deletions(-)
diff --git a/Shared.IOS/UI/WaveSeekBar.cs b/Shared.IOS/UI/WaveSeekBar.cs
index 343ed27..8626676 100644
--- a/Shared.IOS/UI/WaveSeekBar.cs
+++ b/Shared.IOS/UI/WaveSeekBar.cs
@@ -185,24 +185,48 @@
}
}
- /// <summary>
- /// 娉㈡氮杩涘害棰滆壊
- /// </summary>
- /// <value>娉㈡氮杩涘害棰滆壊</value>
- public uint WaveColor
- {
- set
- {
- byte r, g, b, a;
- r = (byte)(value / 256 / 256 % 256);
- g = (byte)(value / 256 % 256);
- b = (byte)(value % 256);
- a = (byte)(value / 256 / 256 / 256 % 256);
- mHDLWaveSeekbar.MWaveProgressBarColor = UIKit.UIColor.FromRGBA(r, g, b, a);
- mHDLWaveSeekbar.SetNeedsDisplay();
- }
- }
+ ///// <summary>
+ ///// 娉㈡氮杩涘害棰滆壊
+ ///// </summary>
+ ///// <value>娉㈡氮杩涘害棰滆壊</value>
+ //public uint WaveColor
+ //{
+ // set
+ // {
+ // byte r, g, b, a;
+ // r = (byte)(value / 256 / 256 % 256);
+ // g = (byte)(value / 256 % 256);
+ // b = (byte)(value % 256);
+ // a = (byte)(value / 256 / 256 / 256 % 256);
+ // mHDLWaveSeekbar.MWaveProgressBarColor = UIKit.UIColor.FromRGBA(r, g, b, a);
+ // mHDLWaveSeekbar.SetNeedsDisplay();
+ // }
+ //}
+ /// <summary>
+ /// 璁剧疆杩涘害鏉� 娓愬彉棰滆壊鐨勫紑濮嬮鑹插拰缁撴潫棰滆壊
+ /// </summary>
+ /// <value>寮�濮嬮鑹层�佺粨鏉熼鑹�</value>
+ public void SetProgressBarColors(uint startColor, uint endColor)
+ {
+ byte r, g, b, a;
+ r = (byte)(startColor / 256 / 256 % 256);
+ g = (byte)(startColor / 256 % 256);
+ b = (byte)(startColor % 256);
+ a = (byte)(startColor / 256 / 256 / 256 % 256);
+
+ var start = UIKit.UIColor.FromRGBA(r, g, b, a);
+
+ byte r2, g2, b2, a2;
+ r2 = (byte)(endColor / 256 / 256 % 256);
+ g2 = (byte)(endColor / 256 % 256);
+ b2 = (byte)(endColor % 256);
+ a2 = (byte)(endColor / 256 / 256 / 256 % 256);
+ var end = UIKit.UIColor.FromRGBA(r2, g2, b2, a2);
+
+ mHDLWaveSeekbar.SetProgressBarColors(start, end);
+ mHDLWaveSeekbar.SetNeedsDisplay();
+ }
/// <summary>
/// 鑳屾櫙杈规棰滆壊
@@ -298,6 +322,7 @@
set
{
mHDLWaveSeekbar.IsProgressTextShow = value;
+ mHDLWaveSeekbar.SetNeedsDisplay();
}
}
--
Gitblit v1.8.0