using DevExpress.Utils.Animation; using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace IStation.WinFormUI { /// /// 控件拓展类 /// public static class ControlExtend { /// /// 绘制控件边框 /// /// 控件 /// PaintEventArgs /// Color /// 默认为1 public static void DrawBorder(this Control ctrl, PaintEventArgs e, Color borderColor, int borderWidth = 1) { ControlPaint.DrawBorder(e.Graphics, ctrl.ClientRectangle, borderColor, borderWidth, ButtonBorderStyle.Solid, borderColor, borderWidth, ButtonBorderStyle.Solid, borderColor, borderWidth, ButtonBorderStyle.Solid, borderColor, borderWidth, ButtonBorderStyle.Solid); } } }