Exemple #1
0
        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);
        }
Exemple #2
0
        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        #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);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
 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;
 }
Exemple #5
0
 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);
 }
Exemple #6
0
 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));
 }