예제 #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;
        }
예제 #2
0
        public FormFooter()
        {
            _designMode = ControlUtil.GetIsInDesignMode(this);

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

            Dock          = DockStyle.Bottom;
            FlowDirection = FlowDirection.RightToLeft;
            AutoSize      = true;
        }
예제 #3
0
        public InformationBar()
        {
            _designMode = ControlUtil.GetIsInDesignMode(this);

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

            Items = new InformationCollection(this);

            TabStop = false;

            UpdateFont();
        }
예제 #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;
            }
        }