protected override void OnPaint(PaintEventArgs e)
 {
     using (e)
     {
         Rectangle bounds = Rectangle.FromLTRB(base.Padding.Left, base.Padding.Top, base.ClientSize.Width - base.Padding.Right, base.ClientSize.Height - base.Padding.Bottom);
         ThrobberRenderEventArgs args = new ThrobberRenderEventArgs(e.Graphics, bounds, this.Position, base.Enabled);
         this.Renderer.DrawThrobber(args);
         this.Position = args.Position;
     }
 }
 public void DrawThrobber(ThrobberRenderEventArgs e)
 {
     e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
     PointF center = new PointF((float) (e.Bounds.Left + (e.Bounds.Width / 2)), (float) ((e.Bounds.Top + (e.Bounds.Height / 2)) - 1));
     for (int i = 0; i < this.FNumberOfSpoke; i++)
     {
         e.Position = e.Position % this.FNumberOfSpoke;
         DrawLine(e.Graphics, GetCoordinate(center, this.FInnerCircleRadius, this.FSpokeAngles[e.Position]), GetCoordinate(center, this.FOuterCircleRadius, this.FSpokeAngles[e.Position]), e.Enabled ? this.FPalette[i] : this.FColor, this.FSpokeThickness);
         e.Position++;
     }
 }
 protected override void OnPaint(PaintEventArgs e)
 {
     using (e)
     {
         ToolStripItemRenderEventArgs args = new ToolStripItemRenderEventArgs(e.Graphics, this);
         base.Parent.Renderer.DrawLabelBackground(args);
         Rectangle bounds = new Rectangle(this.Padding.Left, this.Padding.Top, base.Width - this.Padding.Horizontal, base.Height - this.Padding.Vertical);
         ThrobberRenderEventArgs args2 = new ThrobberRenderEventArgs(e.Graphics, bounds, this.Position, this.Enabled);
         this.Renderer.DrawThrobber(args2);
         this.Position = args2.Position;
     }
 }
        protected override void OnPaint(PaintEventArgs e)
        {
            using (e)
            {
                Rectangle rectangle;
                Rectangle rectangle2;
                Size preferredSize;
                ToolStripItemRenderEventArgs args;
                switch (this.DisplayStyle)
                {
                    case ToolStripItemDisplayStyle.Image:
                    case ToolStripItemDisplayStyle.ImageAndText:
                        rectangle = new Rectangle(this.Padding.Left, this.Padding.Top, base.Width - this.Padding.Horizontal, base.Height - this.Padding.Vertical);
                        if (this.DisplayStyle != ToolStripItemDisplayStyle.ImageAndText)
                        {
                            goto Label_01C9;
                        }
                        preferredSize = this.Renderer.GetPreferredSize(this.Size);
                        rectangle2 = rectangle;
                        switch (base.TextImageRelation)
                        {
                            case TextImageRelation.TextAboveImage:
                                goto Label_010D;

                            case (TextImageRelation.TextAboveImage | TextImageRelation.ImageAboveText):
                                goto Label_01CF;

                            case TextImageRelation.ImageBeforeText:
                                goto Label_014B;

                            case TextImageRelation.TextBeforeImage:
                                goto Label_0188;
                        }
                        goto Label_01CF;

                    default:
                        goto Label_026E;
                }
                rectangle.Height = preferredSize.Height;
                rectangle2.Y += preferredSize.Height;
                rectangle2.Height -= preferredSize.Height;
                goto Label_01CF;
            Label_010D:
                rectangle.Y = rectangle.Bottom - preferredSize.Height;
                rectangle.Height = preferredSize.Height;
                rectangle2.Height -= preferredSize.Height;
                goto Label_01CF;
            Label_014B:
                rectangle.Width = preferredSize.Width;
                rectangle2.X += preferredSize.Width;
                rectangle2.Width -= preferredSize.Width;
                goto Label_01CF;
            Label_0188:
                rectangle.X = rectangle.Right - preferredSize.Width;
                rectangle.Width = preferredSize.Width;
                rectangle2.Width -= preferredSize.Width;
                goto Label_01CF;
            Label_01C9:
                rectangle2 = Rectangle.Empty;
            Label_01CF:
                args = new ToolStripItemRenderEventArgs(e.Graphics, this);
                base.Parent.Renderer.DrawButtonBackground(args);
                ThrobberRenderEventArgs args2 = new ThrobberRenderEventArgs(e.Graphics, rectangle, this.Position, this.Enabled);
                this.Renderer.DrawThrobber(args2);
                this.Position = args2.Position;
                if (!rectangle2.IsEmpty)
                {
                    ToolStripItemTextRenderEventArgs args3 = new ToolStripItemTextRenderEventArgs(e.Graphics, this, this.Text, rectangle2, this.ForeColor, this.Font, this.TextAlign);
                    base.Parent.Renderer.DrawItemText(args3);
                }
                return;
            Label_026E:
                base.OnPaint(e);
            }
        }