private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{
int a, b, c, d = 0;
a = int.Parse(numericUpDown1.Value.ToString());
b = a * 3600;
c = b / 1000;
d = 50;
SolidBrush sb = new SolidBrush(Color.Black);
Bitmap bit = new Bitmap(Width, Height);
Graphics g = Graphics.FromImage(bit);
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
g.DrawPie(new Pen(sb, 1), d, 20, 190, 170, 0, 360);
sb.Color = Color.Silver;
g.FillPie(sb, d, 20, 190, 170, 0, 360);
sb.Color = Color.Black;
g.DrawPie(new Pen(sb, 1), d, 20, 190, 170, -c, c);
sb.Color = Color.Yellow;
g.FillPie(sb, d, 20, 190, 170, -c, c);
this.BackgroundImage = bit;
}
private void Form1_Load(object sender, EventArgs e)
{
numericUpDown1_ValueChanged(null, null);
}