random-file-runner/RyzStudio/Windows/Forms/THorizontalSeparator.cs

115 lines
5.3 KiB
C#
Raw Permalink Normal View History

2021-10-24 15:49:48 +00:00
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace RyzStudio.Windows.Forms
{
public partial class THorizontalSeparator : System.Windows.Forms.UserControl
{
protected readonly Padding defaultMargin = new Padding(5, 0, 5, 10);
protected readonly Padding defaultPadding = new Padding(0, 10, 0, 10);
public THorizontalSeparator()
{
InitializeComponent();
this.BackColor = Color.Transparent;
this.Margin = defaultMargin;
this.MaximumSize = new Size(SystemInformation.VirtualScreen.Width, 22);
this.MinimumSize = new Size(0, 22);
this.Padding = defaultPadding;
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
this.Margin = defaultMargin;
this.Padding = defaultPadding;
}
protected override void OnPaintBackground(PaintEventArgs e)
{
base.OnPaintBackground(e);
Graphics g = e.Graphics;
g.FillRectangle(new SolidBrush(Color.FromArgb(213, 223, 229)), new Rectangle(this.DisplayRectangle.Left, 11, this.DisplayRectangle.Width, 1));
g.FillRectangle(new SolidBrush(Color.FromArgb(249, 251, 253)), new Rectangle(this.DisplayRectangle.Left, 12, this.DisplayRectangle.Width, 1));
}
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public override Image BackgroundImage { get => base.BackgroundImage; set => base.BackgroundImage = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public override ImageLayout BackgroundImageLayout { get => base.BackgroundImageLayout; set => base.BackgroundImageLayout = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public new BorderStyle BorderStyle { get => base.BorderStyle; set => base.BorderStyle = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public override Cursor Cursor { get => base.Cursor; set => base.Cursor = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public override Font Font { get => base.Font; set => base.Font = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public override Color BackColor { get => base.BackColor; set => base.BackColor = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public override Color ForeColor { get => base.ForeColor; set => base.ForeColor = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public override RightToLeft RightToLeft { get => base.RightToLeft; set => base.RightToLeft = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public new bool UseWaitCursor { get => base.UseWaitCursor; set => base.UseWaitCursor = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public override bool AllowDrop { get => base.AllowDrop; set => base.AllowDrop = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public override AutoValidate AutoValidate { get => base.AutoValidate; set => base.AutoValidate = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public override ContextMenuStrip ContextMenuStrip { get => base.ContextMenuStrip; set => base.ContextMenuStrip = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public new ImeMode ImeMode { get => base.ImeMode; set => base.ImeMode = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public override bool AutoScroll { get => base.AutoScroll; set => base.AutoScroll = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public new Size AutoScrollMargin { get => base.AutoScrollMargin; set => base.AutoScrollMargin = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public new Size AutoScrollMinSize { get => base.AutoScrollMinSize; set => base.AutoScrollMinSize = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public override bool AutoSize { get => base.AutoSize; set => base.AutoSize = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public new AutoSizeMode AutoSizeMode { get => base.AutoSizeMode; set => base.AutoSizeMode = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public override Size MaximumSize { get => base.MaximumSize; set => base.MaximumSize = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public override Size MinimumSize { get => base.MinimumSize; set => base.MinimumSize = value; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public new Padding Margin { get => base.Margin; set => base.Margin = defaultMargin; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public new Padding Padding { get => base.Padding; set => base.Padding = defaultPadding; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public new DockStyle Dock { get => base.Dock; set => base.Dock = value; }
}
}