public void SetFontColor(MobileFontColors color) { switch (color) { case MobileFontColors.Default: Control.ForeColor = GRAY_COLOR; break; case MobileFontColors.Info: Control.ForeColor = Color.DarkGreen; break; case MobileFontColors.Warning: Control.ForeColor = Color.DarkRed; break; case MobileFontColors.Empty: Control.ForeColor = Color.White; break; case MobileFontColors.Disable: Control.ForeColor = Color.LightSlateGray; break; } }
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); }
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); }
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; }
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); }
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); }
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); }
public void SetControlStyle(MobileFontSize size, MobileFontPosition position, MobileFontColors color, FontStyle fontStyle) { SetFontSize(size, fontStyle); SetFontPosition(position); SetFontColor(color); }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #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); }
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)); }
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)); }
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)); }