* UIRoundProcess:修改显示值

This commit is contained in:
Sunny 2021-06-24 22:15:47 +08:00
parent 79bced975f
commit 7f0b93c40a
5 changed files with 10 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -74,7 +74,6 @@ namespace Sunny.UI
set
{
inner = Math.Max(value, 0);
inner = Math.Min(value, outer - 5);
Invalidate();
}
}
@ -88,7 +87,6 @@ namespace Sunny.UI
set
{
outer = Math.Max(value, 5);
inner = Math.Min(inner, outer - 5);
Invalidate();
}
}
@ -152,6 +150,16 @@ namespace Sunny.UI
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
int iin = Math.Min(inner, outer);
int iou = Math.Max(inner, outer);
if (iin == iou)
{
iou = iin + 1;
}
inner = iin;
outer = iou;
g.FillFan(ProcessBackColor, ClientRectangle.Center(), Inner, Outer, 0, 360);
g.FillFan(ProcessColor, ClientRectangle.Center(), Inner, Outer, -90, Value * 1.0f / Maximum * 360.0f);
}