Ejemplo n.º 1
0
        public void SetFontSize(MobileFontSize size, FontStyle fontStyle)
        {
            int fontSize;

            switch (size)
            {
            case MobileFontSize.Normal:
                Control.Height = ExactHeight == 0 ? 20 : ExactHeight;
                fontSize       = 12;
                break;

            case MobileFontSize.Little:
                Control.Height = ExactHeight == 0 ? 15 : ExactHeight;
                fontSize       = 8;
                break;

            case MobileFontSize.Large:
                Control.Height = ExactHeight == 0 ? 30 : ExactHeight;
                fontSize       = 16;
                break;

            case MobileFontSize.Multiline:
                Control.Height = ExactHeight == 0 ? 75 : ExactHeight;
                fontSize       = 12;
                break;

            default:
                fontSize = 12;
                break;
            }
            Control.Font = new Font("Arial", fontSize, fontStyle);
        }
Ejemplo n.º 2
0
        public MobileLabel(MainForm Form, string text, int left, int top, int width, int exactHeight, MobileFontSize size, MobileFontPosition position, MobileFontColors color, FontStyle fontStyle, string ControlName)
        {
            ExactHeight = exactHeight;

            Control.Left = left;
            Control.Top = top;
            Control.Text = text;

            if (width > 0)
            {
                Control.Width = width;
            }

            Control.Name = ControlName;
            SetControlStyle(size, position, color, fontStyle);
            Form.Controls.Add(Control);
        }
Ejemplo n.º 3
0
 public MobileLabel CreateLabel(string text, int left, int top, int width, int height, MobileFontSize size,
     MobileFontPosition position, MobileFontColors color, FontStyle fontStyle)
 {
     return CreateLabel(text, left, top, width, height, size, position, color, fontStyle, string.Empty);
 }
Ejemplo n.º 4
0
 public MobileLabel CreateLabel(string text, int left, int top, int width, MobileFontSize size,
     MobileFontPosition position, MobileFontColors color)
 {
     return CreateLabel(text, left, top, width, 0, size, position, color, FontStyle.Regular, string.Empty);
 }
Ejemplo n.º 5
0
 public MobileLabel CreateLabel(string text, int left, int top, int width, MobileFontSize size,
     MobileFontPosition position, FontStyle fontStyle)
 {
     return CreateLabel(text, left, top, width, 0, size, position, MobileFontColors.Default, fontStyle,
                        string.Empty);
 }
Ejemplo n.º 6
0
 public MobileLabel CreateLabel(string text, int left, int top, int width, MobileFontSize size)
 {
     return CreateLabel(text, left, top, width, 0, size, MobileFontPosition.Left, MobileFontColors.Default,
                        FontStyle.Regular, string.Empty);
 }
Ejemplo n.º 7
0
 public void SetControlStyle(MobileFontSize size, MobileFontPosition position, MobileFontColors color, FontStyle fontStyle)
 {
     SetFontSize(size, fontStyle);
     SetFontPosition(position);
     SetFontColor(color);
 }
Ejemplo n.º 8
0
 public MobileLabel CreateLabel(string text, int left, int top, int width, MobileFontSize size, MobileFontPosition position, MobileFontColors color)
 {
     return(CreateLabel(text, left, top, width, 0, size, position, color, FontStyle.Regular, string.Empty));
 }
Ejemplo n.º 9
0
        public void SetFontSize(MobileFontSize size, FontStyle fontStyle)
        {
            int fontSize;

            switch (size)
            {
                case MobileFontSize.Normal:
                    Control.Height = ExactHeight == 0 ? 20 : ExactHeight;
                    fontSize = 12;
                    break;
                case MobileFontSize.Little:
                    Control.Height = ExactHeight == 0 ? 15 : ExactHeight;
                    fontSize = 8;
                    break;
                case MobileFontSize.Large:
                    Control.Height = ExactHeight == 0 ? 30 : ExactHeight;
                    fontSize = 16;
                    break;
                case MobileFontSize.Multiline:
                    Control.Height = ExactHeight == 0 ? 75 : ExactHeight;
                    fontSize = 12;
                    break;
                default:
                    fontSize = 12;
                    break;
            }
            Control.Font = new Font("Arial", fontSize, fontStyle);
        }
Ejemplo n.º 10
0
 public void SetControlStyle(MobileFontSize size, MobileFontPosition position, MobileFontColors color, FontStyle fontStyle)
 {
     SetFontSize(size, fontStyle);
     SetFontPosition(position);
     SetFontColor(color);
 }
Ejemplo n.º 11
0
        public MobileLabel CreateLabel(string text, int left, int top, int width, int height, MobileFontSize size, MobileFontPosition position, MobileFontColors color, FontStyle fontStyle, string controlName)
        {
            MobileLabel NewControl = new MobileLabel(MainForm, text, left, top, width, height, size, position, color, fontStyle, controlName);

            ControlsArray.Add(NewControl);
            return(NewControl);
        }
Ejemplo n.º 12
0
 public MobileLabel CreateLabel(string text, int left, int top, int width, MobileFontSize size, MobileFontPosition position, MobileFontColors color, FontStyle fontStyle, string controlName)
 {
     return(CreateLabel(text, left, top, width, 0, size, position, color, fontStyle, controlName));
 }
Ejemplo n.º 13
0
 public MobileLabel CreateLabel(string text, int left, int top, int width, int height, MobileFontSize size, MobileFontPosition position, MobileFontColors color, FontStyle fontStyle)
 {
     return(CreateLabel(text, left, top, width, height, size, position, color, fontStyle, string.Empty));
 }
Ejemplo n.º 14
0
 public MobileLabel CreateLabel(string text, int left, int top, int width, MobileFontSize size,
     MobileFontPosition position, MobileFontColors color, FontStyle fontStyle,
     string controlName)
 {
     return CreateLabel(text, left, top, width, 0, size, position, color, fontStyle, controlName);
 }
Ejemplo n.º 15
0
        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        #region Public methods
        public MobileLabel(MainForm Form, string text, int left, int top, int width, int exactHeight, MobileFontSize size, MobileFontPosition position, MobileFontColors color, FontStyle fontStyle, string ControlName)
        {
            ExactHeight = exactHeight;

            Control.Left = left;
            Control.Top  = top;
            Control.Text = text;

            if (width > 0)
            {
                Control.Width = width;
            }

            Control.Name = ControlName;
            SetControlStyle(size, position, color, fontStyle);
            Form.Controls.Add(Control);
        }
Ejemplo n.º 16
0
 public MobileLabel CreateLabel(string text, int left, int top, int width, int height, MobileFontSize size,
     MobileFontPosition position, MobileFontColors color, FontStyle fontStyle,
     string controlName)
 {
     MobileLabel NewControl = new MobileLabel(MainForm, text, left, top, width, height, size, position, color,
                                              fontStyle, controlName);
     ControlsArray.Add(NewControl);
     return NewControl;
 }
Ejemplo n.º 17
0
 public MobileLabel CreateLabel(string text, int left, int top, int width, MobileFontSize size, MobileFontPosition position, FontStyle fontStyle)
 {
     return(CreateLabel(text, left, top, width, 0, size, position, MobileFontColors.Default, fontStyle, string.Empty));
 }