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 LabelForConstructor(string text, ControlsStyle style) : this() { Text = text; Style = style; AddParameterData = false; }
public LabelForConstructor(string text, ControlsStyle style, bool addParameterData) : this() { Text = text; Style = style; AddParameterData = addParameterData; }
public LabelForConstructor(string name, string text, ControlsStyle style, bool addParameterData) : this() { Name = name; Text = text; Style = style; AddParameterData = addParameterData; }
public LabelForConstructor(string name, bool allowEdit, string text, ControlsStyle style, bool addParameterData) : this() { Name = name; AllowEditValue = allowEdit; Text = text; Style = style; AddParameterData = addParameterData; }
public MobileLabel(MainForm Form, string text, int left, int top, int width, int exactHeight, ControlsStyle style, string ControlName) { ExactHeight = exactHeight; Control.Left = left; Control.Top = top; Control.Text = text; if (width > 0) { Control.Width = width; } Control.Name = ControlName; SetControlsStyle(style); Form.Controls.Add(Control); }
public MobileTextBox CreateTextBox(int left, int top, int width, string controlName, ControlsStyle style) { return CreateTextBox(left, top, width, controlName, style, null, false, true); }
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 MobileTextBox CreateTextBox(int left, int top, int width, string controlName, ControlsStyle style, bool isPasswordField) { return CreateTextBox(left, top, width, controlName, style, null, isPasswordField, true); }
public MobileLabel CreateLabel(string text, int left, int top, int width, int height, ControlsStyle style, string controlName) { MobileLabel NewControl = new MobileLabel(MainForm, text, left, top, width, height, style, controlName); ControlsArray.Add(NewControl); return NewControl; }
public MobileLabel CreateLabel(string text, int left, int top, int width, ControlsStyle style, string controlName) { return CreateLabel(text, left, top, width, 0, style, controlName); }
public MobileControl CreateTextBox(int left, int top, int width, string controlName, ControlsStyle style) { return(CreateTextBox(left, top, width, controlName, style, null, false, true)); }
public MobileLabel CreateLabel(string text, int left, int top, int width, int height, ControlsStyle style) { return(CreateLabel(text, left, top, width, height, style, string.Empty)); }
public MobileControl CreateTextBox(int left, int top, int width, string controlName, ControlsStyle style, bool isPasswordField) { return(CreateTextBox(left, top, width, controlName, style, null, isPasswordField, true)); }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #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 void SetControlsStyle(ControlsStyle style) { switch (style) { case ControlsStyle.LabelNormal: { Control.Height = ExactHeight == 0 ? 25 : ExactHeight; Control.Font = new Font("Arial", 12, FontStyle.Bold); Control.ForeColor = Color.FromArgb(0, 0, 192); break; } case ControlsStyle.LabelRedRightAllign: { Control.Height = ExactHeight == 0 ? 25 : ExactHeight; Control.Font = new Font("Arial", 12, FontStyle.Bold); Control.TextAlign = ContentAlignment.TopRight; Control.ForeColor = Color.FromArgb(192, 0, 0); break; } case ControlsStyle.LabelLarge: { Control.Height = ExactHeight == 0 ? 28 : ExactHeight; Control.Font = new Font("Arial", 16, FontStyle.Regular); Control.ForeColor = Color.FromArgb(0, 0, 192); break; } case ControlsStyle.LabelSmall: { //Control.Height = 15; Control.Font = new Font("Arial", 8, FontStyle.Regular); Control.ForeColor = Color.FromArgb(0, 0, 192); break; } case ControlsStyle.LabelH2: { Control.TextAlign = ContentAlignment.TopCenter; Control.Font = new Font("Arial", 10, FontStyle.Bold); Control.ForeColor = Color.FromArgb(0, 0, 192); break; } case ControlsStyle.LabelH2Red: { Control.TextAlign = ContentAlignment.TopCenter; Control.Font = new Font("Arial", 10, FontStyle.Bold); Control.ForeColor = Color.FromArgb(212, 0, 56); break; } case ControlsStyle.LabelMultiline: { Control.TextAlign = ContentAlignment.TopCenter; Control.Font = new Font("Arial", 16, FontStyle.Regular); Control.ForeColor = Color.FromArgb(192, 0, 0); Control.Height = ExactHeight == 0 ? 75 : ExactHeight; break; } case ControlsStyle.LabelMultilineSmall: { Control.TextAlign = ContentAlignment.TopCenter; Control.Font = new Font("Arial", 12, FontStyle.Regular); Control.ForeColor = Color.FromArgb(192, 0, 0); Control.Height = ExactHeight == 0 ? 75 : ExactHeight; break; } } }
public MobileControl CreateTextBox(int left, int top, int width, string controlName, ControlsStyle style, OnEventHandlingDelegate ProcTarget, bool isPasswordField, bool isTextField) { MobileControl 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 MobileLabel CreateLabel(string text, int left, int top, int width, int height, ControlsStyle style, string controlName) { MobileLabel NewControl = new MobileLabel(MainForm, text, left, top, width, height, style, controlName); ControlsArray.Add(NewControl); return(NewControl); }
public MobileLabel CreateLabel(string text, int left, int top, int width, ControlsStyle style, string controlName) { return(CreateLabel(text, left, top, width, 0, style, controlName)); }
public MobileLabel CreateLabel(string text, int left, int top, int width, int height, ControlsStyle style) { return CreateLabel(text, left, top, width, height, style, string.Empty); }
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)); }