Beispiel #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);
        }
Beispiel #2
0
 public LabelForConstructor(string text, ControlsStyle style)
     : this()
 {
     Text = text;
     Style = style;
     AddParameterData = false;
 }
Beispiel #3
0
 public LabelForConstructor(string text, ControlsStyle style, bool addParameterData)
     : this()
 {
     Text = text;
     Style = style;
     AddParameterData = addParameterData;
 }
Beispiel #4
0
 public LabelForConstructor(string text, ControlsStyle style)
     : this()
 {
     Text             = text;
     Style            = style;
     AddParameterData = false;
 }
Beispiel #5
0
 public LabelForConstructor(string name, string text, ControlsStyle style, bool addParameterData)
     : this()
 {
     Name             = name;
     Text             = text;
     Style            = style;
     AddParameterData = addParameterData;
 }
Beispiel #6
0
 public LabelForConstructor(string name, bool allowEdit, string text, ControlsStyle style, bool addParameterData)
     : this()
 {
     Name = name;
     AllowEditValue = allowEdit;
     Text = text;
     Style = style;
     AddParameterData = addParameterData;
 }
Beispiel #7
0
        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);
        }
Beispiel #8
0
 public MobileTextBox CreateTextBox(int left, int top, int width, string controlName, ControlsStyle style)
 {
     return CreateTextBox(left, top, width, controlName, style, null, false, true);
 }
Beispiel #9
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);
 }
Beispiel #10
0
 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);
 }
Beispiel #11
0
 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;
 }
Beispiel #12
0
 public MobileLabel CreateLabel(string text, int left, int top, int width, ControlsStyle style,
     string controlName)
 {
     return CreateLabel(text, left, top, width, 0, style, controlName);
 }
Beispiel #13
0
 public MobileControl CreateTextBox(int left, int top, int width, string controlName, ControlsStyle style)
 {
     return(CreateTextBox(left, top, width, controlName, style, null, false, true));
 }
Beispiel #14
0
 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));
 }
Beispiel #15
0
        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);
        }
Beispiel #16
0
 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));
 }
Beispiel #17
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);
        }
Beispiel #18
0
        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;
                    }

            }
        }
Beispiel #19
0
        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);
        }
Beispiel #20
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;
 }
Beispiel #21
0
        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);
        }
Beispiel #22
0
 public MobileLabel CreateLabel(string text, int left, int top, int width, ControlsStyle style, string controlName)
 {
     return(CreateLabel(text, left, top, width, 0, style, controlName));
 }
Beispiel #23
0
 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);
 }
Beispiel #24
0
        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;
            }
            }
        }
Beispiel #25
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));
 }