Пример #1
0
        public static void SetBasicPaletteColours(PictureBox baseColour, PictureBox darkestColour, PictureBox mediumColour, PictureBox lightColour, PictureBox lightestColour)
        {
            BasicColourSettingsManager basicPaletteColourManager = new BasicColourSettingsManager();

            try
            {
                if (!BasicColourSettingsManager.AreBasicPaletteColoursEmpty())
                {
                    basicPaletteColourManager.ResetToDefaults();

                    basicPaletteColourManager.SetBaseColour(baseColour.BackColor);

                    basicPaletteColourManager.SetDarkColour(darkestColour.BackColor);

                    basicPaletteColourManager.SetMediumColour(mediumColour.BackColor);

                    basicPaletteColourManager.SetLightColour(lightColour.BackColor);

                    basicPaletteColourManager.SetLightestColour(lightestColour.BackColor);

                    basicPaletteColourManager.SaveBasicColourSettings();
                }
                else
                {
                    basicPaletteColourManager.SetBaseColour(baseColour.BackColor);

                    basicPaletteColourManager.SetDarkColour(darkestColour.BackColor);

                    basicPaletteColourManager.SetMediumColour(mediumColour.BackColor);

                    basicPaletteColourManager.SetLightColour(lightColour.BackColor);

                    basicPaletteColourManager.SetLightestColour(lightestColour.BackColor);

                    basicPaletteColourManager.SaveBasicColourSettings();
                }
            }
            catch (Exception exc)
            {
                KryptonMessageBox.Show($"An unexpected error has occurred: { exc.Message }", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

                basicPaletteColourManager.ResetToDefaults();
            }
        }
Пример #2
0
        /// <summary>
        /// Whites the wash all colours.
        /// </summary>
        public static void WhiteWashAllColours()
        {
            #region Variables

            #region Setting Managers
            AllMergedColourSettingsManager allMergedColourSettingsManager = new AllMergedColourSettingsManager();

            BasicColourSettingsManager basicColourSettingsManager = new BasicColourSettingsManager();

            CustomColourSettingsManager customColourSettingsManager = new CustomColourSettingsManager();

            CustomTextColourSettingsManager customTextColourSettingsManager = new CustomTextColourSettingsManager();

            LinkTextColourSettingsManager linkTextColourSettingsManager = new LinkTextColourSettingsManager();

            MiscellaneousColourSettingsManager miscellaneousColourSettingsManager = new MiscellaneousColourSettingsManager();

            StandardControlTextColourSettingsManager standardControlTextColourSettingsManager = new StandardControlTextColourSettingsManager();

            TextColourSettingsManager textColourSettingsManager = new TextColourSettingsManager();
            #endregion

            Color white = Color.White;
            #endregion

            #region Colours

            #region All Merged Colours
            allMergedColourSettingsManager.SetBaseColour(white);

            allMergedColourSettingsManager.SetDarkColour(white);

            allMergedColourSettingsManager.SetMediumColour(white);

            allMergedColourSettingsManager.SetLightColour(white);

            allMergedColourSettingsManager.SetLightestColour(white);

            allMergedColourSettingsManager.SetCustomColourOne(white);

            allMergedColourSettingsManager.SetCustomColourTwo(white);

            allMergedColourSettingsManager.SetCustomColourThree(white);

            allMergedColourSettingsManager.SetCustomColourFour(white);

            allMergedColourSettingsManager.SetCustomColourFive(white);

            allMergedColourSettingsManager.SetCustomColourSix(white);

            allMergedColourSettingsManager.SetCustomTextColourOne(white);

            allMergedColourSettingsManager.SetCustomTextColourTwo(white);

            allMergedColourSettingsManager.SetCustomTextColourThree(white);

            allMergedColourSettingsManager.SetCustomTextColourFour(white);

            allMergedColourSettingsManager.SetCustomTextColourFive(white);

            allMergedColourSettingsManager.SetCustomTextColourSix(white);

            allMergedColourSettingsManager.SetLinkFocusedColour(white);

            allMergedColourSettingsManager.SetLinkHoverColour(white);

            allMergedColourSettingsManager.SetLinkNormalColour(white);

            allMergedColourSettingsManager.SetLinkVisitedColour(white);

            allMergedColourSettingsManager.SetBorderColour(white);

            allMergedColourSettingsManager.SetDisabledControlColour(white);

            allMergedColourSettingsManager.SetMenuTextColour(white);

            allMergedColourSettingsManager.SetRibbonTabTextColour(white);

            allMergedColourSettingsManager.SetStatusStripTextColour(white);

            allMergedColourSettingsManager.SetAlternativeNormalTextColour(white);

            allMergedColourSettingsManager.SetDisabledTextColour(white);

            allMergedColourSettingsManager.SetFocusedTextColour(white);

            allMergedColourSettingsManager.SetNormalTextColour(white);

            allMergedColourSettingsManager.SetPressedTextColour(white);
            #endregion

            #region Basic Colours
            basicColourSettingsManager.SetBaseColour(white);

            basicColourSettingsManager.SetDarkColour(white);

            basicColourSettingsManager.SetMediumColour(white);

            basicColourSettingsManager.SetLightColour(white);

            basicColourSettingsManager.SetLightestColour(white);
            #endregion

            #region Custom Colours
            customColourSettingsManager.SetCustomColourOne(white);

            customColourSettingsManager.SetCustomColourTwo(white);

            customColourSettingsManager.SetCustomColourThree(white);

            customColourSettingsManager.SetCustomColourFour(white);

            customColourSettingsManager.SetCustomColourFive(white);

            customColourSettingsManager.SetCustomColourSix(white);
            #endregion

            #region Custom Text Colours
            customTextColourSettingsManager.SetCustomTextColourOne(white);

            customTextColourSettingsManager.SetCustomTextColourTwo(white);

            customTextColourSettingsManager.SetCustomTextColourThree(white);

            customTextColourSettingsManager.SetCustomTextColourFour(white);

            customTextColourSettingsManager.SetCustomTextColourFive(white);

            customTextColourSettingsManager.SetCustomTextColourSix(white);
            #endregion

            #region Link Text Colours
            linkTextColourSettingsManager.SetLinkFocusedColour(white);

            linkTextColourSettingsManager.SetLinkHoverColour(white);

            linkTextColourSettingsManager.SetLinkNormalColour(white);

            linkTextColourSettingsManager.SetLinkVisitedColour(white);
            #endregion

            #region Miscellaneous Colours
            miscellaneousColourSettingsManager.SetBorderColour(white);

            miscellaneousColourSettingsManager.SetDisabledControlColour(white);
            #endregion

            #region Standard Control Text Colours
            standardControlTextColourSettingsManager.SetMenuTextColour(white);

            standardControlTextColourSettingsManager.SetRibbonTabTextColour(white);

            standardControlTextColourSettingsManager.SetStatusStripTextColour(white);
            #endregion

            #region Text Colours
            textColourSettingsManager.SetAlternativeNormalTextColour(white);

            textColourSettingsManager.SetDisabledTextColour(white);

            textColourSettingsManager.SetFocusedTextColour(white);

            textColourSettingsManager.SetNormalTextColour(white);

            textColourSettingsManager.SetPressedTextColour(white);
            #endregion

            #endregion

            #region Save Settings
            allMergedColourSettingsManager.SaveAllMergedColourSettings();

            basicColourSettingsManager.SaveBasicColourSettings();

            customColourSettingsManager.SaveCustomColourSettings();

            customTextColourSettingsManager.SaveCustomTextColourSettings();

            linkTextColourSettingsManager.SaveLinkTextColourSettings();

            miscellaneousColourSettingsManager.SaveMiscellaneousColourSettings();

            standardControlTextColourSettingsManager.SaveStandardControlTextColourSettings();

            textColourSettingsManager.SaveTextColourSettings();
            #endregion
        }