* UIWaitingBar: 修改可自定义配色

This commit is contained in:
Sunny 2024-02-23 22:32:43 +08:00
parent 7ff8e13363
commit 547ec9de80

View File

@ -18,6 +18,7 @@
*
* 2020-07-20: V2.2.6
* 2022-03-19: V3.1.1
* 2024-02-23: V3.6.3
******************************************************************************/
using System;
@ -72,7 +73,7 @@ namespace Sunny.UI
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
e.Graphics.FillRoundRectangle(rectColor, (int)dz + 1, 1, sliderWidth, Height - 3, Radius);
e.Graphics.FillRoundRectangle(foreColor, (int)dz + 1, 1, sliderWidth, Height - 3, Radius);
}
//d是度数不是弧度
@ -153,5 +154,38 @@ namespace Sunny.UI
fillColor = uiColor.ProcessBarFillColor;
foreColor = uiColor.ProcessBarForeColor;
}
/// <summary>
/// 边框颜色
/// </summary>
[Description("边框颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")]
public Color RectColor
{
get => rectColor;
set => SetRectColor(value);
}
/// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary>
[Description("填充颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")]
public Color FillColor
{
get => fillColor;
set => SetFillColor(value);
}
/// <summary>
/// 字体颜色
/// </summary>
[Description("前景颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "White")]
public override Color ForeColor
{
get => foreColor;
set => SetForeColor(value);
}
}
}