public InputSearch( Control parentpal, int lineint, int lineflo, string predesc, string preword, Font descfont, Size descsize, Font font, Size size, Point point, Color defrcolor, Color debkcolor, Color linecolor, Color linelight, Color backcolor, Color backlight, Color forecolor, Color forelight, MouseEventHandler searchEnter, KeyEventHandler searchEnterKey, AnchorStyles anchorstyle ) { Linecolor = linecolor; Linelight = linelight; Backcolor = backcolor; Backlight = backlight; Forecolor = forecolor; Forelight = forelight; var inputPal = new LPanel ( parentpal, lineint, size, point, Linecolor, Backcolor, anchorstyle ); inputPal.Controls.Add(this); var inputdesc = new LButton ( inputPal, 0, predesc, descfont, descsize, new Point(size.Width - descsize.Width, -1), debkcolor, debkcolor, debkcolor, Color.FromArgb(51, debkcolor), defrcolor, defrcolor, AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom ); inputdesc.Focus(); inputdesc.MouseClick += searchEnter; PreWord = preword; Text = preword; Multiline = false; Size = new Size(inputPal.Size.Width - 8*lineint - descsize.Width, inputPal.Size.Height - 4*lineint); Location = new Point(4*lineint, (4 + lineflo)*lineint); BackColor = Backcolor; ForeColor = Forecolor; Font = font; Anchor = anchorstyle; AllowDrop = true; DragEnter += FPanel_DragEnter; Leave += LInput_Leave; Enter += LInput_Enter; KeyDown += searchEnterKey; GotFocus += InputBoxWithDesc_GotFocus; LostFocus += InputBoxWithDesc_LostFocus; }
public InputBoxWithDesc( Control parentpal, int lineint, int lineflo, string predesc, string preword, Font descfont, Size descsize, Font font, Size size, Point point, Color defrcolor, Color debkcolor, 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 inputdesc = new HDarge ( parentpal, predesc, descfont, descsize, point, defrcolor, debkcolor, ContentAlignment.MiddleCenter, anchorstyle ); var inputPal = new LPanel ( parentpal, lineint, size, new Point(inputdesc.Location.X + inputdesc.Width, inputdesc.Location.Y), Linecolor, Backcolor, anchorstyle ); PreWord = preword; Text = PreWord; Multiline = true; Size = new Size(inputPal.Size.Width - 8*lineint, inputPal.Size.Height - 4*lineint); Location = new Point(4*lineint, (4 + lineflo)*lineint); BackColor = Backcolor; ForeColor = Forecolor; Font = font; Anchor = anchorstyle; Leave += LInput_Leave; Enter += LInput_Enter; GotFocus += InputBoxWithDesc_GotFocus; LostFocus += InputBoxWithDesc_LostFocus; inputPal.Controls.Add(this); }