Esempio n. 1
0
        /// <summary>
        /// The Method to update the form with the style manager style and it's controls.
        /// </summary>
        private void UpdateForm()
        {
            switch (MetroForm)
            {
            case IMetroForm form:
                form.Style                  = Style;
                form.ThemeAuthor            = ThemeAuthor;
                form.ThemeName              = ThemeName;
                form.StyleManager           = this;
                form.StyleManager.MetroForm = _ownerForm;
                break;
            }

            if (MetroForm.Controls.Count > 0)
            {
                UpdateControls(MetroForm.Controls);
            }

            MetroForm.Invalidate();
        }
Esempio n. 2
0
        /// <summary>
        /// The Method to update the form with the style manager style and it's controls.
        /// </summary>
        private void UpdateForm()
        {
            switch (MetroForm)
            {
            case null:
                return;

            case iForm form when CustomTheme != null:
                form.Style        = Style;
                form.ThemeAuthor  = ThemeAuthor;
                form.ThemeName    = ThemeName;
                form.StyleManager = this;
                break;
            }

            if (MetroForm.Controls.Count > 0)
            {
                UpdateControls(MetroForm.Controls);
            }

            MetroForm.Invalidate();
        }
Esempio n. 3
0
        /// <summary>
        /// The Method to update the form with the style manager style and it's controls.
        /// </summary>
        public void UpdateForm()
        {
            if (MetroForm == null)
            {
                return;
            }

            if (MetroForm is iForm form && CustomTheme != null)
            {
                form.Style        = Style;
                form.ThemeAuthor  = ThemeAuthor;
                form.ThemeName    = ThemeName;
                form.StyleManager = this;
            }

            if (MetroForm.Controls.Count > 0)
            {
                UpdateControls(MetroForm.Controls);
            }

            MetroForm.Invalidate();
        }