Exemplo n.º 1
0
        public static void ApplyStyle_Ex(Control C, Layer03_Common.Str_Style? Style)
        {
            if (Style == null) { return; }

            Layer03_Common.Str_Style Inner_Style = Style.Value;

            C.Font = Inner_Style.Font;
            C.ForeColor = Inner_Style.Color;

            if (C is Label)
            {
                Label Inner_C = (C as Label);
                //Inner_C.BorderStyle = Inner_Style.BorderStyle.HasValue ? Inner_Style.BorderStyle.Value : BorderStyle.None;
                Inner_C.BorderStyle = Inner_Style.BorderStyle;
            }
            else if (C is TextBox)
            {
                TextBox Inner_C = (C as TextBox);
            }
            else if (C is Button)
            {
                Button Inner_C = (C as Button);
            }
            else if (C is ComboBox)
            {
                ComboBox Inner_C = (C as ComboBox);
                //Inner_C.FlatStyle = Inner_Style.FlatStyle.HasValue ? Inner_Style.FlatStyle.Value : FlatStyle.Popup;
                Inner_C.FlatStyle = Inner_Style.FlatStyle;
            }
        }
Exemplo n.º 2
0
        //[-]
        public static void ApplyStyle(Control C, Layer03_Common.Str_Style? Style)
        {
            if (Style == null) { return; }

            if (C.Controls.Count > 0)
            {
                foreach (Control Inner_C in C.Controls)
                { Layer03_Common.ApplyStyle(Inner_C, Style); }
            }

            Layer03_Common.ApplyStyle_Ex(C, Style);
        }