Exemplo n.º 1
0
        public FormHelper(Control control)
        {
            _control = control;
            _form    = control as System.Windows.Forms.Form;

            InDesignMode = ControlUtil.GetIsInDesignMode(control);

            if (InDesignMode)
            {
                return;
            }

            _defaultFontName = _control.Font.Name;
            _defaultFontSize = _control.Font.Size;

            var correctFont = SystemFonts.MessageBoxFont;

            if (!(_control is UserControl))
            {
                _control.Font = correctFont;
            }

            _correctFontName = correctFont.Name;
            _correctFontSize = correctFont.Size;
        }
Exemplo n.º 2
0
        public FormFooter()
        {
            _designMode = ControlUtil.GetIsInDesignMode(this);

            SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw, true);

            Dock          = DockStyle.Bottom;
            FlowDirection = FlowDirection.RightToLeft;
            AutoSize      = true;
        }
Exemplo n.º 3
0
        public InformationBar()
        {
            _designMode = ControlUtil.GetIsInDesignMode(this);

            SetStyle(ControlStyles.DoubleBuffer | ControlStyles.ResizeRedraw, true);

            Items = new InformationCollection(this);

            TabStop = false;

            UpdateFont();
        }
Exemplo n.º 4
0
        private void UpdateThemeData()
        {
            if (!ControlUtil.GetIsInDesignMode(this) && Application.RenderWithVisualStyles)
            {
                _borderColor = new VisualStyleRenderer("ListView", 0, 0).GetColor(ColorProperty.BorderColor);

                if (_borderColor == Color.Black)
                {
                    _borderColor = SystemColors.ControlDark;
                }
            }
            else
            {
                _borderColor = SystemColors.ControlDark;
            }
        }