12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- 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);
- }
- }
- }
|