Example #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);
                }
            }
        }
Example #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);
 }
Example #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);
            }
        }
Example #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);
 }
Example #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());
 }
Example #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);
 }
Example #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);
 }
Example #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);
 }