Exemplo n.º 1
0
        private void DoLayoutControls(Control.ControlCollection controls, DialogLayoutSettings layout)
        {
            foreach (Control control in controls)
            {
                if (control.Name == "panelHeader")
                {
                    control.BackColor = layout.BackHeaderColor;
                }

                Button buttonControl = control as Button;
                if (null != buttonControl)
                {
                    buttonControl.ForeColor = layout.ForeAlternateColor;
                    buttonControl.FlatAppearance.BorderColor = layout.BackHeaderColor;
                }
                else
                {
                    control.ForeColor = layout.ForeColor;
                }

                if (control.Controls.Count > 0)
                {
                    DoLayoutControls(control.Controls, layout);
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// <see cref="ToolsDialog.DoLayout"/>
 /// </summary>
 /// <param name="layout">layout settings</param>
 protected internal override void DoLayout(DialogLayoutSettings layout)
 {
     dataGridViewErrors.BackgroundColor = layout.BackHeaderColor;
     dataGridViewErrors.ColumnHeadersDefaultCellStyle.BackColor = layout.BackColor;
     dataGridViewErrors.ColumnHeadersDefaultCellStyle.ForeColor = layout.ForeAlternateColor;
     base.DoLayout(layout);
 }
Exemplo n.º 3
0
        private void DoLayoutControls(Control.ControlCollection controls, DialogLayoutSettings layout)
        {
            foreach (Control control in controls)
            {
                if (control.Name == "panelHeader")
                    control.BackColor = layout.BackHeaderColor;

                Button buttonControl = control as Button;
                if (null != buttonControl)
                {
                    buttonControl.ForeColor = layout.ForeAlternateColor;
                    buttonControl.FlatAppearance.BorderColor = layout.BackHeaderColor;
                }
                else
                {
                    control.ForeColor = layout.ForeColor;
                }

                if (control.Controls.Count > 0)
                    DoLayoutControls(control.Controls, layout);
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// <see cref="ToolsDialog.DoLayout"/>
 /// </summary>
 /// <param name="layout">layout settings</param>
 protected internal override void DoLayout(DialogLayoutSettings layout)
 {
     panelLicenceHeader.BackColor = layout.BackAlternateColor;
     base.DoLayout(layout);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Creates an instance of the class
 /// </summary>
 /// <param name="owner">owner instance</param>
 protected internal DialogUtils(CommonUtils owner)
 {
     if (null == owner)
         throw new ArgumentNullException("owner");
     CurrentLanguage = _currentDefaultLanguage;
     _owner = owner;
     _openNonModalDialogs = new Dictionary<Form, NonModalDialogValue>();
     SuppressOnAutomation = true;
     SuppressOnHide = true;
     Layout = new DialogLayoutSettings();
     Localization = new DialogLocalizationSettings(ToolsDialog.CreateDialogSchema());
 }
Exemplo n.º 6
0
 /// <summary>
 /// Do layout settings in form instance
 /// </summary>
 /// <param name="layout">layout settings</param>
 protected internal virtual void DoLayout(DialogLayoutSettings layout)
 {
     BackColor = layout.BackColor;
     ForeColor = layout.ForeColor;
     DoLayoutControls(this.Controls, layout);
 }
Exemplo n.º 7
0
 /// <summary>
 /// <see cref="ToolsDialog.DoLayout"/>
 /// </summary>
 /// <param name="layout">layout settings</param>
 protected internal override void DoLayout(DialogLayoutSettings layout)
 {
     dataGridViewDiagnostics.BackgroundColor = layout.BackHeaderColor;
     dataGridViewDiagnostics.ColumnHeadersDefaultCellStyle.BackColor = layout.BackColor;
     dataGridViewDiagnostics.ColumnHeadersDefaultCellStyle.ForeColor = layout.ForeAlternateColor;
     base.DoLayout(layout);
 }
 /// <summary>
 /// <see cref="ToolsDialog.DoLayout"/>
 /// </summary>
 /// <param name="layout">layout settings</param>
 protected internal override void DoLayout(DialogLayoutSettings layout)
 {
     panelLicenceHeader.BackColor = layout.BackAlternateColor;
     base.DoLayout(layout);
 }
Exemplo n.º 9
0
 /// <summary>
 /// Do layout settings in form instance
 /// </summary>
 /// <param name="layout">layout settings</param>
 protected internal virtual void DoLayout(DialogLayoutSettings layout)
 {
     BackColor = layout.BackColor;
     ForeColor = layout.ForeColor;
     DoLayoutControls(this.Controls, layout);
 }