2015-08-03 15:33:50 +00:00
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
2018-09-27 08:05:10 +00:00
|
|
|
|
namespace Quasar.Server.Controls
|
2015-08-03 15:33:50 +00:00
|
|
|
|
{
|
|
|
|
|
public class Line : Control
|
|
|
|
|
{
|
|
|
|
|
public enum Alignment
|
|
|
|
|
{
|
|
|
|
|
Horizontal,
|
|
|
|
|
Vertical
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Alignment LineAlignment { get; set; }
|
|
|
|
|
|
|
|
|
|
public Line()
|
|
|
|
|
{
|
|
|
|
|
this.TabStop = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnPaint(PaintEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
base.OnPaint(e);
|
|
|
|
|
e.Graphics.DrawLine(new Pen(new SolidBrush(Color.LightGray)), new Point(5, 5),
|
|
|
|
|
LineAlignment == Alignment.Horizontal ? new Point(500, 5) : new Point(5, 500));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|