protected override void OnPaint(PaintEventArgs e) { ThemeModule.g = e.Graphics; ThemeModule.g.Clear(Color.FromArgb(25, 90, 105)); boundsRect = new Rectangle(0, 0, Width - 1, Height - 1); ThemeModule.DrawCenteredString(ThemeModule.g, Text, Font, textBrush, boundsRect, 0, 1); }
protected override void OnPaint(PaintEventArgs e) { ThemeModule.g = e.Graphics; ThemeModule.g.SmoothingMode = SmoothingMode.AntiAlias; boundsRect = new Rectangle(0, 0, Width, Height); ThemeModule.g.FillRectangle(Brushes.WhiteSmoke, boundsRect); if (state == ThemeModule.MouseState.Over) { ThemeModule.g.FillRectangle(overBrush, boundsRect); } else if (state == ThemeModule.MouseState.Down) { ThemeModule.g.FillRectangle(downBrush, boundsRect); } ThemeModule.DrawCenteredString(ThemeModule.g, Text, Font, textBrush, boundsRect, 0, 1); }