using System.Drawing; namespace System.Windows.Forms { public class PaintEventArgs : EventArgs, IDisposable { public Rectangle ClipRectangle { get; } public Graphics Graphics { get; } public PaintEventArgs(Graphics graphics, Rectangle clipRect) { if (graphics == null) { throw new ArgumentNullException("graphics"); } Graphics = graphics; ClipRectangle = clipRect; } public void Dispose() { } } public delegate void PaintEventHandler(object sender, PaintEventArgs e); }