public LPanel( Control parentpal, int lineint, Size size, Point point, Color linecolor, Color backcolor, AnchorStyles anchorstyle ) { var panelSec = new HPanel { Size = size, Location = point, Anchor = anchorstyle, BackColor = linecolor, }; Size = new Size(panelSec.Size.Width - 2*lineint, panelSec.Size.Height - 2*lineint); Location = new Point(lineint, lineint); BackColor = backcolor; Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom; panelSec.Controls.Add(this); parentpal.Controls.Add(panelSec); }
public LButton( Control parentpal, int lineint, string text, Font font, Size size, Point point, Color linecolor, Color linelight, Color backcolor, Color backlight, Color forecolor, Color forelight, AnchorStyles anchorstyle ) { Linecolor = linecolor; Linelight = linelight; Backcolor = backcolor; Backlight = backlight; Forecolor = forecolor; Forelight = forelight; var panelSec = new HPanel { Size = size, Location = point, Anchor = anchorstyle, BackColor = linecolor, }; Text = text; Font = font; TextAlign = ContentAlignment.MiddleCenter; Size = new Size(panelSec.Size.Width - 2*lineint, panelSec.Size.Height - 2*lineint); Location = new Point(lineint, lineint); ForeColor = Forecolor; BackColor = Backcolor; Anchor = AnchorStyles.Top; Cursor = Cursors.Hand; panelSec.Controls.Add(this); parentpal.Controls.Add(panelSec); MouseUp += LButton_MouseUp; MouseDown += LButton_MouseDown; MouseHover += LButton_MouseHover; MouseLeave += LButton_MouseLeave; }