using SmartCoalApplication.Core; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace SmartCoalApplication.PluginAssemblys { internal class ColorRectangleControl : UserControl { private Color rectangleColor; public Color RectangleColor { get { return rectangleColor; } set { rectangleColor = value; Invalidate(true); } } public ColorRectangleControl() { this.ResizeRedraw = true; this.DoubleBuffered = true; } protected override void OnPaint(PaintEventArgs e) { Utility.DrawColorRectangle(e.Graphics, this.ClientRectangle, rectangleColor, true); base.OnPaint(e); } } }