Esempio n. 1
0
        public RichLabeledComponent(Base parent, String label, T component, Font labelFont, SystemDrawing.Color labelColor, RelationalPosition labelPosition = RelationalPosition.LEFT, RelationalSize labelScale = RelationalSize.NONE, int?Spacing = null) : base(parent)
        {
            if (component == null)
            {
                throw new ArgumentNullException("LabelComponent cannot recieve a null component");
            }
            mLabelText        = label;
            Component         = component;
            mLabelFontScaling = labelScale;
            mLabelPosition    = labelPosition;
            mSpaceBetweenLabelAndComponent = Spacing;

            mLabel          = new RichLabel(this);
            LabelFont       = labelFont;
            LabelColor      = labelColor;
            mLayoutRequired = true;
        }
Esempio n. 2
0
        public LabeledComponent(Base parent, String label, T component, RelationalPosition labelPosition = RelationalPosition.LEFT, RelationalSize labelScale = RelationalSize.NONE, int?Spacing = null, Font font = default(Font), SystemDrawing.Color fontColor = default(SystemDrawing.Color)) : base(parent)
        {
            if (component == null)
            {
                throw new ArgumentNullException("LabelComponent cannot recieve a null component");
            }
            mLabelText        = label;
            Component         = component;
            mLabelFontScaling = labelScale;
            mLabelPosition    = labelPosition;
            LabelColor        = fontColor == null || fontColor == default(SystemDrawing.Color) ? this.Skin.Colors.Label.Default : fontColor;
            mSpaceBetweenLabelAndComponent = Spacing;

            LabelFont = font == default(Font) || font == null ? this.Skin.DefaultFont : font;
            mLabel    = new Label(this)
            {
                TextColorOverride = LabelColor, Text = LabelText, Font = LabelFont
            };
            mLayoutRequired = true;
        }
Esempio n. 3
0
 public RichLabeledComponent(Base parent, String label, T component, SystemDrawing.Color fontColor, RelationalPosition labelPosition = RelationalPosition.LEFT, RelationalSize labelScale = RelationalSize.NONE, int?Spacing = null) : this(parent, label, component, default(Font), fontColor, labelPosition, labelScale, Spacing)
 {
     LabelColor = fontColor;
 }
Esempio n. 4
0
 public RichLabeledComponent(Base parent, String label, T component, Font font, RelationalPosition labelPosition = RelationalPosition.LEFT, RelationalSize labelScale = RelationalSize.NONE, int?Spacing = null) : this(parent, label, component, font, SystemDrawing.Color.Black, labelPosition, labelScale, Spacing)
 {
     LabelFont = font == default(Font) || font == null ? this.Skin.DefaultFont : font;
 }