private void ResetProgressBar(int progressPercentage, string value)
{
Image image = new Bitmap(panel1.Width, panel1.Height);
Graphics g = Graphics.FromImage(image);
SolidBrush brushBackColor = new SolidBrush(Color.Transparent);
SolidBrush brushPercentColor = new SolidBrush(Color.Lime);
SolidBrush brushBlue = new SolidBrush(Color.Blue);
g.Clear(Color.White);
g.FillRectangle(brushPercentColor, 0, 0, (float)(panel1.Width* progressPercentage/max), panel1.Height);
Font font = new Font("宋体", 8, FontStyle.Regular);
PointF pointF = new PointF(panel1.Width / 2 - 10, panel1.Height / 2 );
g.DrawString(value, font, Brushes.Black, pointF);
panel1.BackgroundImage = image;
}