public void DrawBackground(ProgressBarRenderEventArgs e)
 {
     e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
     e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
     this.DrawBackground(e.Graphics, e.Bounds);
     this.DrawBackgroundShadows(e.Graphics, e.Bounds);
 }
 public void DrawBackground(ProgressBarRenderEventArgs e)
 {
     Point[] points = new Point[] { new Point(e.Bounds.Left + 3, e.Bounds.Top + 1), new Point(e.Bounds.Right - 3, e.Bounds.Top + 1), new Point(e.Bounds.Right - 2, e.Bounds.Top + 2), new Point(e.Bounds.Right - 1, e.Bounds.Top + 3), new Point(e.Bounds.Right - 1, e.Bounds.Bottom - 4), new Point(e.Bounds.Right - 2, e.Bounds.Bottom - 3), new Point(e.Bounds.Right - 3, e.Bounds.Bottom - 2), new Point(e.Bounds.Left + 3, e.Bounds.Bottom - 1), new Point(e.Bounds.Left + 2, e.Bounds.Bottom - 3), new Point(e.Bounds.Left + 1, e.Bounds.Bottom - 4), new Point(e.Bounds.Left + 1, e.Bounds.Top + 3), new Point(e.Bounds.Left + 2, e.Bounds.Top + 2) };
     using (GraphicsPath path = new GraphicsPath())
     {
         path.AddLines(points);
         using (Brush brush = new SolidBrush(this.BarBackgroundColor))
         {
             e.Graphics.FillPath(brush, path);
         }
     }
     DrawBorder(e.Graphics, e.Bounds);
 }
 protected override void OnPaint(PaintEventArgs e)
 {
     using (e)
     {
         ProgressBarRenderEventArgs args = new ProgressBarRenderEventArgs(e.Graphics, this);
         this.FRenderer.DrawBackground(args);
         if (base.Style == ProgressBarStyle.Marquee)
         {
             ProgressBarMarqueeRenderEventArgs args2 = new ProgressBarMarqueeRenderEventArgs(e.Graphics, this, this.MarqueeTag);
             this.FRenderer.DrawMarquee(args2);
         }
         else
         {
             ProgressBarValueRenderEventArgs args3 = new ProgressBarValueRenderEventArgs(e.Graphics, this);
             this.FRenderer.DrawBarValue(args3);
         }
     }
 }