public MobileTextBox(MainForm Form, int left, int top, int width, string controlName, ControlsStyle style, OnEventHandlingDelegate ProcTarget, bool isPasswordField, bool isTextField) { Control.ForeColor = Color.DarkGreen; Control.Left = left; Control.Top = top; Control.BorderStyle = BorderStyle.None; Control.Width = width; Control.Name = controlName; Control.Height = 25; Control.Font = new Font("Arial", 12, FontStyle.Bold); if (isPasswordField) { Control.PasswordChar = '*'; } if (ProcTarget != null) { OnChanged = ProcTarget; Control.Validated += new EventHandler(ProcTarget); } if (isTextField) { Control.KeyPress += (OnKeyPressedCheckingText); } else { Control.KeyPress += (OnKeyPressedCheckingNumber); } Form.Controls.Add(Control); }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #region Public methods public MobileTextBox(MainForm Form, int left, int top, int width, string controlName, ControlsStyle style, OnEventHandlingDelegate ProcTarget, bool isPasswordField, bool isTextField) { Control.ForeColor = Color.DarkGreen; Control.Left = left; Control.Top = top; Control.BorderStyle = BorderStyle.None; Control.Width = width; Control.Name = controlName; Control.Height = 25; Control.Font = new Font("Arial", 12, FontStyle.Bold); if (isPasswordField) { Control.PasswordChar = '*'; } if (ProcTarget != null) { OnChanged = ProcTarget; Control.Validated += new EventHandler(ProcTarget); } if (isTextField) { Control.KeyPress += (OnKeyPressedCheckingText); } else { Control.KeyPress += (OnKeyPressedCheckingNumber); } Form.Controls.Add(Control); }
public MobileTextBox CreateTextBox(int left, int top, int width, string controlName, ControlsStyle style, OnEventHandlingDelegate ProcTarget, bool isPasswordField, bool isTextField) { var NewControl = new MobileTextBox(MainForm, left, top, width, controlName, style, ProcTarget, isPasswordField, isTextField); ControlsArray.Add(NewControl); return(NewControl); }
public MobileTextBox CreateTextBox(int left, int top, int width, string controlName, ControlsStyle style, OnEventHandlingDelegate ProcTarget, bool isPasswordField, bool isTextField) { var NewControl = new MobileTextBox(MainForm, left, top, width, controlName, style, ProcTarget, isPasswordField, isTextField); ControlsArray.Add(NewControl); return NewControl; }
public MobileTextBox CreateTextBox(int left, int top, int width, string controlName, ControlsStyle style, OnEventHandlingDelegate ProcTarget, bool isTextField) { return CreateTextBox(left, top, width, controlName, style, ProcTarget, false, isTextField); }
public MobileControl CreateTextBox(int left, int top, int width, string controlName, ControlsStyle style, OnEventHandlingDelegate ProcTarget, bool isTextField) { return(CreateTextBox(left, top, width, controlName, style, ProcTarget, false, isTextField)); }