/// <summary>
        /// Merges all colour settings together.
        /// </summary>
        /// <param name="usePrompt">if set to <c>true</c> [use prompt].</param>
        public static void MergeAllColourSettings(bool usePrompt = false)
        {
            #region Variables
            BasicColourSettingsManager basicPaletteColourManager = new BasicColourSettingsManager();

            CustomColourSettingsManager customPaletteColourManager = new CustomColourSettingsManager();

            CustomTextColourSettingsManager customPaletteTextColourManager = new CustomTextColourSettingsManager();

            LinkTextColourSettingsManager linkTextPaletteColourManager = new LinkTextColourSettingsManager();

            MiscellaneousColourSettingsManager miscellaneousPaletteColourManager = new MiscellaneousColourSettingsManager();

            StandardControlTextColourSettingsManager standardControlTextColourSettingsManager = new StandardControlTextColourSettingsManager();

            TextColourSettingsManager textPaletteColourManager = new TextColourSettingsManager();

            AllMergedColourSettingsManager colourSettingsManager = new AllMergedColourSettingsManager();
            #endregion

            try
            {
                if (BasicColourSettingsManager.AreBasicPaletteColoursEmpty() || CustomColourSettingsManager.AreCustomPaletteColoursEmpty() || CustomTextColourSettingsManager.AreCustomPaletteTextColoursEmpty() || LinkTextColourSettingsManager.AreLinkTextPaletteColoursEmpty() || MiscellaneousColourSettingsManager.AreMiscellaneousPaletteColoursEmpty() || StandardControlTextColourSettingsManager.AreStandardControlTextColoursEmpty() || TextColourSettingsManager.AreTextPaletteColoursEmpty())
                {
                    KryptonMessageBox.Show("There are no colours to merge.", "Undefined Colours", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    if (usePrompt)
                    {
                        DialogResult result = KryptonMessageBox.Show("Do you want to merge all the colour settings together?", "Confirm Merge", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                        if (result == DialogResult.Yes)
                        {
                            colourSettingsManager.SetAlternativeNormalTextColour(textPaletteColourManager.GetAlternativeNormalTextColour());

                            colourSettingsManager.SetBaseColour(basicPaletteColourManager.GetBaseColour());

                            colourSettingsManager.SetBorderColour(miscellaneousPaletteColourManager.GetBorderColour());

                            colourSettingsManager.SetCustomColourOne(customPaletteColourManager.GetCustomColourOne());

                            colourSettingsManager.SetCustomColourTwo(customPaletteColourManager.GetCustomColourTwo());

                            colourSettingsManager.SetCustomColourThree(customPaletteColourManager.GetCustomColourThree());

                            colourSettingsManager.SetCustomColourFour(customPaletteColourManager.GetCustomColourFour());

                            colourSettingsManager.SetCustomColourFive(customPaletteColourManager.GetCustomColourFive());

                            colourSettingsManager.SetCustomColourSix(customPaletteColourManager.GetCustomColourSix());

                            colourSettingsManager.SetCustomTextColourOne(customPaletteTextColourManager.GetCustomTextColourOne());

                            colourSettingsManager.SetCustomTextColourTwo(customPaletteTextColourManager.GetCustomTextColourTwo());

                            colourSettingsManager.SetCustomTextColourThree(customPaletteTextColourManager.GetCustomTextColourThree());

                            colourSettingsManager.SetCustomTextColourFour(customPaletteTextColourManager.GetCustomTextColourFour());

                            colourSettingsManager.SetCustomTextColourFive(customPaletteTextColourManager.GetCustomTextColourFive());

                            colourSettingsManager.SetCustomTextColourSix(customPaletteTextColourManager.GetCustomTextColourSix());

                            colourSettingsManager.SetDarkColour(basicPaletteColourManager.GetDarkColour());

                            colourSettingsManager.SetDisabledControlColour(miscellaneousPaletteColourManager.GetDisabledControlColour());

                            colourSettingsManager.SetDisabledTextColour(textPaletteColourManager.GetDisabledTextColour());

                            colourSettingsManager.SetFocusedTextColour(textPaletteColourManager.GetFocusedTextColour());

                            colourSettingsManager.SetLightColour(basicPaletteColourManager.GetLightColour());

                            colourSettingsManager.SetLightestColour(basicPaletteColourManager.GetLightestColour());

                            colourSettingsManager.SetLinkDisabledColour(linkTextPaletteColourManager.GetLinkDisabledColour());

                            colourSettingsManager.SetLinkFocusedColour(linkTextPaletteColourManager.GetLinkFocusedColour());

                            colourSettingsManager.SetLinkHoverColour(linkTextPaletteColourManager.GetLinkHoverColour());

                            colourSettingsManager.SetLinkNormalColour(linkTextPaletteColourManager.GetLinkNormalColour());

                            colourSettingsManager.SetLinkVisitedColour(linkTextPaletteColourManager.GetLinkVisitedColour());

                            colourSettingsManager.SetMediumColour(basicPaletteColourManager.GetMediumColour());

                            colourSettingsManager.SetMenuTextColour(standardControlTextColourSettingsManager.GetMenuTextColour());

                            colourSettingsManager.SetNormalTextColour(textPaletteColourManager.GetNormalTextColour());

                            colourSettingsManager.SetPressedTextColour(textPaletteColourManager.GetPressedTextColour());

                            colourSettingsManager.SetRibbonTabTextColour(standardControlTextColourSettingsManager.GetRibbonTabTextColour());

                            colourSettingsManager.SetStatusStripTextColour(standardControlTextColourSettingsManager.GetStatusStripTextColour());

                            colourSettingsManager.SaveAllMergedColourSettings(usePrompt);
                        }
                    }
                    else
                    {
                        colourSettingsManager.SetAlternativeNormalTextColour(textPaletteColourManager.GetAlternativeNormalTextColour());

                        colourSettingsManager.SetBaseColour(basicPaletteColourManager.GetBaseColour());

                        colourSettingsManager.SetBorderColour(miscellaneousPaletteColourManager.GetBorderColour());

                        colourSettingsManager.SetCustomColourOne(customPaletteColourManager.GetCustomColourOne());

                        colourSettingsManager.SetCustomColourTwo(customPaletteColourManager.GetCustomColourTwo());

                        colourSettingsManager.SetCustomColourThree(customPaletteColourManager.GetCustomColourThree());

                        colourSettingsManager.SetCustomColourFour(customPaletteColourManager.GetCustomColourFour());

                        colourSettingsManager.SetCustomColourFive(customPaletteColourManager.GetCustomColourFive());

                        colourSettingsManager.SetCustomTextColourOne(customPaletteTextColourManager.GetCustomTextColourOne());

                        colourSettingsManager.SetCustomTextColourTwo(customPaletteTextColourManager.GetCustomTextColourTwo());

                        colourSettingsManager.SetCustomTextColourThree(customPaletteTextColourManager.GetCustomTextColourThree());

                        colourSettingsManager.SetCustomTextColourFour(customPaletteTextColourManager.GetCustomTextColourFour());

                        colourSettingsManager.SetCustomTextColourFive(customPaletteTextColourManager.GetCustomTextColourFive());

                        colourSettingsManager.SetDarkColour(basicPaletteColourManager.GetDarkColour());

                        colourSettingsManager.SetDisabledControlColour(miscellaneousPaletteColourManager.GetDisabledControlColour());

                        colourSettingsManager.SetDisabledTextColour(textPaletteColourManager.GetDisabledTextColour());

                        colourSettingsManager.SetFocusedTextColour(textPaletteColourManager.GetFocusedTextColour());

                        colourSettingsManager.SetLightColour(basicPaletteColourManager.GetLightColour());

                        colourSettingsManager.SetLightestColour(basicPaletteColourManager.GetLightestColour());

                        colourSettingsManager.SetLinkDisabledColour(linkTextPaletteColourManager.GetLinkDisabledColour());

                        colourSettingsManager.SetLinkFocusedColour(linkTextPaletteColourManager.GetLinkFocusedColour());

                        colourSettingsManager.SetLinkHoverColour(linkTextPaletteColourManager.GetLinkHoverColour());

                        colourSettingsManager.SetLinkNormalColour(linkTextPaletteColourManager.GetLinkNormalColour());

                        colourSettingsManager.SetLinkVisitedColour(linkTextPaletteColourManager.GetLinkVisitedColour());

                        colourSettingsManager.SetMediumColour(basicPaletteColourManager.GetMediumColour());

                        colourSettingsManager.SetMenuTextColour(standardControlTextColourSettingsManager.GetMenuTextColour());

                        colourSettingsManager.SetNormalTextColour(textPaletteColourManager.GetNormalTextColour());

                        colourSettingsManager.SetPressedTextColour(textPaletteColourManager.GetPressedTextColour());

                        colourSettingsManager.SetRibbonTabTextColour(standardControlTextColourSettingsManager.GetRibbonTabTextColour());

                        colourSettingsManager.SetStatusStripTextColour(standardControlTextColourSettingsManager.GetStatusStripTextColour());

                        colourSettingsManager.SaveAllMergedColourSettings();
                    }
                }
            }
            catch (Exception exc)
            {
                ExceptionHandler.CaptureException(exc, icon: MessageBoxIcon.Error, methodSignature: Helpers.GetCurrentMethod());
            }
        }
コード例 #2
0
        /// <summary>
        /// Sets the colour settings.
        /// </summary>
        /// <param name="text">The palette colour definition.</param>
        /// <param name="colour">The colour value.</param>
        public static void SetColour(string text, Color colour)
        {
            #region Settings
            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

            #region Branching

            #region Custom Colours
            if (text == "Custom Colour One")
            {
                customColourSettingsManager.SetCustomColourOne(colour);
            }
            else if (text == "Custom Colour Two")
            {
                customColourSettingsManager.SetCustomColourTwo(colour);
            }
            else if (text == "Custom Colour Three")
            {
                customColourSettingsManager.SetCustomColourThree(colour);
            }
            else if (text == "Custom Colour Four")
            {
                customColourSettingsManager.SetCustomColourFour(colour);
            }
            else if (text == "Custom Colour Five")
            {
                customColourSettingsManager.SetCustomColourFive(colour);
            }
            else if (text == "Custom Colour Six")
            {
                customColourSettingsManager.SetCustomColourSix(colour);
            }
            #endregion

            #region Custom Text Colours
            if (text == "Custom Text Colour One")
            {
                customTextColourSettingsManager.SetCustomTextColourOne(colour);
            }
            else if (text == "Custom Text Colour Two")
            {
                customTextColourSettingsManager.SetCustomTextColourTwo(colour);
            }
            else if (text == "Custom Text Colour Three")
            {
                customTextColourSettingsManager.SetCustomTextColourThree(colour);
            }
            else if (text == "Custom Text Colour Four")
            {
                customTextColourSettingsManager.SetCustomTextColourFour(colour);
            }
            else if (text == "Custom Text Colour Five")
            {
                customTextColourSettingsManager.SetCustomTextColourFive(colour);
            }
            else if (text == "Custom Text Colour Six")
            {
                customTextColourSettingsManager.SetCustomTextColourSix(colour);
            }
            #endregion

            #region Link Text Colours
            if (text == "Link Focused Colour")
            {
                linkTextColourSettingsManager.SetLinkFocusedColour(colour);
            }
            else if (text == "Link Hover Colour")
            {
                linkTextColourSettingsManager.SetLinkHoverColour(colour);
            }
            else if (text == "Link Normal Colour")
            {
                linkTextColourSettingsManager.SetLinkNormalColour(colour);
            }
            else if (text == "Link Visited Colour")
            {
                linkTextColourSettingsManager.SetLinkVisitedColour(colour);
            }
            #endregion

            #region Miscellaneous Colours
            if (text == "Border Colour")
            {
                miscellaneousColourSettingsManager.SetBorderColour(colour);
            }
            else if (text == "Disabled Control Colour")
            {
                miscellaneousColourSettingsManager.SetDisabledControlColour(colour);
            }
            #endregion

            #region Standard Control Text Colours
            if (text == "Menu Text Colour")
            {
                standardControlTextColourSettingsManager.SetMenuTextColour(colour);
            }
            else if (text == "Status Strip Text Colour")
            {
                standardControlTextColourSettingsManager.SetStatusStripTextColour(colour);
            }
            else if (text == "Ribbon Tab Text Colour")
            {
                standardControlTextColourSettingsManager.SetRibbonTabTextColour(colour);
            }
            #endregion

            #region Text Colours
            if (text == "Alternative Normal Text Colour")
            {
                textColourSettingsManager.SetAlternativeNormalTextColour(colour);
            }
            else if (text == "Disabled Text Colour")
            {
                textColourSettingsManager.SetDisabledTextColour(colour);
            }
            else if (text == "Focused Text Colour")
            {
                textColourSettingsManager.SetFocusedTextColour(colour);
            }
            else if (text == "Normal Text Colour")
            {
                textColourSettingsManager.SetNormalTextColour(colour);
            }
            else if (text == "Pressed Text Colour")
            {
                textColourSettingsManager.SetPressedTextColour(colour);
            }
            #endregion

            #endregion
        }
        /// <summary>
        /// Saves the colour configuration file.
        /// </summary>
        /// <param name="settingsType">Type of the settings.</param>
        /// <param name="basePath">The base path.</param>
        /// <param name="useConfirmationDialog">if set to <c>true</c> [use confirmation dialog].</param>
        public static void SaveColourConfigurationFile(ColourSettingsType settingsType, string basePath, bool useConfirmationDialog = false)
        {
            #region Variables
            string path = null;
            #endregion

            if (useConfirmationDialog)
            {
                #region Stuff
                switch (settingsType)
                {
                case ColourSettingsType.ALLCOLOURSETTINGS:
                    path = $"{ basePath }\\All Colours Configuration File - { TranslationMethods.ReturnSafeFileNameDateTimeString() }";

                    File.Create(path);

                    AllMergedColourSettingsManager.WriteRGBColoursToFile(path);
                    break;

                case ColourSettingsType.BASICCOLOURSETTINGS:
                    path = $"{ basePath }\\Basic Colours Configuration File - { TranslationMethods.ReturnSafeFileNameDateTimeString() }";

                    File.Create(path);

                    BasicColourSettingsManager.WriteRGBColoursToFile(path);
                    break;

                case ColourSettingsType.CUSTOMCOLOURSETTINGS:
                    path = $"{ basePath }\\Custom Colours Configuration File - { TranslationMethods.ReturnSafeFileNameDateTimeString() }";

                    File.Create(path);

                    CustomColourSettingsManager.WriteRGBColoursToFile(path);
                    break;

                case ColourSettingsType.CUSTOMTEXTCOLOURSETTINGS:
                    path = $"{ basePath }\\Custom Text Colours Configuration File - { TranslationMethods.ReturnSafeFileNameDateTimeString() }";

                    File.Create(path);

                    CustomTextColourSettingsManager.WriteRGBColoursToFile(path);
                    break;

                case ColourSettingsType.LINKTEXTCOLOURSETTINGS:
                    path = $"{ basePath }\\Link Text Colours Configuration File - { TranslationMethods.ReturnSafeFileNameDateTimeString() }";

                    File.Create(path);

                    LinkTextColourSettingsManager.WriteRGBColoursToFile(path);
                    break;

                case ColourSettingsType.MISCELLANEOUSCOLOURSETTINGS:
                    path = $"{ basePath }\\Miscellaneous Colours Configuration File - { TranslationMethods.ReturnSafeFileNameDateTimeString() }";

                    File.Create(path);

                    MiscellaneousColourSettingsManager.WriteRGBColoursToFile(path);
                    break;

                case ColourSettingsType.STANDARDCONTROLTEXTCOLOURSETTINGS:
                    path = $"{ basePath }\\Standard Control Text Colours Configuration File - { TranslationMethods.ReturnSafeFileNameDateTimeString() }";

                    File.Create(path);

                    StandardControlTextColourSettingsManager.WriteRGBColoursToFile(path);
                    break;

                case ColourSettingsType.TEXTCOLOURSETTINGS:
                    path = $"{ basePath }\\Text Colours Configuration File - { TranslationMethods.ReturnSafeFileNameDateTimeString() }";

                    File.Create(path);

                    TextColourSettingsManager.WriteRGBColoursToFile(path);
                    break;
                }
                #endregion
            }
            else
            {
                #region Stuff
                switch (settingsType)
                {
                case ColourSettingsType.ALLCOLOURSETTINGS:
                    path = $"{ basePath }\\All Colours Configuration File - { TranslationMethods.ReturnSafeFileNameDateTimeString() }";

                    File.Create(path);

                    AllMergedColourSettingsManager.WriteRGBColoursToFile(path);
                    break;

                case ColourSettingsType.BASICCOLOURSETTINGS:
                    path = $"{ basePath }\\Basic Colours Configuration File - { TranslationMethods.ReturnSafeFileNameDateTimeString() }";

                    File.Create(path);

                    BasicColourSettingsManager.WriteRGBColoursToFile(path);
                    break;

                case ColourSettingsType.CUSTOMCOLOURSETTINGS:
                    path = $"{ basePath }\\Custom Colours Configuration File - { TranslationMethods.ReturnSafeFileNameDateTimeString() }";

                    File.Create(path);

                    CustomColourSettingsManager.WriteRGBColoursToFile(path);
                    break;

                case ColourSettingsType.CUSTOMTEXTCOLOURSETTINGS:
                    path = $"{ basePath }\\Custom Text Colours Configuration File - { TranslationMethods.ReturnSafeFileNameDateTimeString() }";

                    File.Create(path);

                    CustomTextColourSettingsManager.WriteRGBColoursToFile(path);
                    break;

                case ColourSettingsType.LINKTEXTCOLOURSETTINGS:
                    path = $"{ basePath }\\Link Text Colours Configuration File - { TranslationMethods.ReturnSafeFileNameDateTimeString() }";

                    File.Create(path);

                    LinkTextColourSettingsManager.WriteRGBColoursToFile(path);
                    break;

                case ColourSettingsType.MISCELLANEOUSCOLOURSETTINGS:
                    path = $"{ basePath }\\Miscellaneous Colours Configuration File - { TranslationMethods.ReturnSafeFileNameDateTimeString() }";

                    File.Create(path);

                    MiscellaneousColourSettingsManager.WriteRGBColoursToFile(path);
                    break;

                case ColourSettingsType.STANDARDCONTROLTEXTCOLOURSETTINGS:
                    path = $"{ basePath }\\Standard Control Text Colours Configuration File - { TranslationMethods.ReturnSafeFileNameDateTimeString() }";

                    File.Create(path);

                    StandardControlTextColourSettingsManager.WriteRGBColoursToFile(path);
                    break;

                case ColourSettingsType.TEXTCOLOURSETTINGS:
                    path = $"{ basePath }\\Text Colours Configuration File - { TranslationMethods.ReturnSafeFileNameDateTimeString() }";

                    File.Create(path);

                    TextColourSettingsManager.WriteRGBColoursToFile(path);
                    break;
                }
                #endregion
            }
        }
コード例 #4
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
        }
コード例 #5
0
        public static void MergeAllColours()
        {
            #region Variables
            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

            try
            {
                #region Basic Colours
                if (!BasicColourSettingsManager.AreBasicPaletteColoursEmpty())
                {
                    allMergedColourSettingsManager.SetBaseColour(basicColourSettingsManager.GetBaseColour());

                    allMergedColourSettingsManager.SetDarkColour(basicColourSettingsManager.GetDarkColour());

                    allMergedColourSettingsManager.SetMediumColour(basicColourSettingsManager.GetMediumColour());

                    allMergedColourSettingsManager.SetLightColour(basicColourSettingsManager.GetLightColour());

                    allMergedColourSettingsManager.SetLightestColour(basicColourSettingsManager.GetLightestColour());
                }
                #endregion

                #region Custom Colours
                if (!CustomColourSettingsManager.AreCustomPaletteColoursEmpty())
                {
                    allMergedColourSettingsManager.SetCustomColourOne(customColourSettingsManager.GetCustomColourOne());

                    allMergedColourSettingsManager.SetCustomColourTwo(customColourSettingsManager.GetCustomColourTwo());

                    allMergedColourSettingsManager.SetCustomColourThree(customColourSettingsManager.GetCustomColourThree());

                    allMergedColourSettingsManager.SetCustomColourFour(customColourSettingsManager.GetCustomColourFour());

                    allMergedColourSettingsManager.SetCustomColourFive(customColourSettingsManager.GetCustomColourFive());

                    allMergedColourSettingsManager.SetCustomColourSix(customColourSettingsManager.GetCustomColourSix());
                }
                #endregion

                #region Custom Text Colours
                if (!CustomTextColourSettingsManager.AreCustomPaletteTextColoursEmpty())
                {
                    allMergedColourSettingsManager.SetCustomTextColourOne(customTextColourSettingsManager.GetCustomTextColourOne());

                    allMergedColourSettingsManager.SetCustomTextColourTwo(customTextColourSettingsManager.GetCustomTextColourTwo());

                    allMergedColourSettingsManager.SetCustomTextColourThree(customTextColourSettingsManager.GetCustomTextColourThree());

                    allMergedColourSettingsManager.SetCustomTextColourFour(customTextColourSettingsManager.GetCustomTextColourFour());

                    allMergedColourSettingsManager.SetCustomTextColourFive(customTextColourSettingsManager.GetCustomTextColourFive());

                    allMergedColourSettingsManager.SetCustomTextColourSix(customTextColourSettingsManager.GetCustomTextColourSix());
                }
                #endregion

                #region Link Colours
                allMergedColourSettingsManager.SetLinkDisabledColour(linkTextColourSettingsManager.GetLinkDisabledColour());

                allMergedColourSettingsManager.SetLinkFocusedColour(linkTextColourSettingsManager.GetLinkFocusedColour());

                allMergedColourSettingsManager.SetLinkHoverColour(linkTextColourSettingsManager.GetLinkHoverColour());

                allMergedColourSettingsManager.SetLinkNormalColour(linkTextColourSettingsManager.GetLinkNormalColour());

                allMergedColourSettingsManager.SetLinkVisitedColour(linkTextColourSettingsManager.GetLinkVisitedColour());
                #endregion

                allMergedColourSettingsManager.SaveAllMergedColourSettings();
            }
            catch (Exception exc)
            {
                ExceptionHandler.CaptureException(exc, icon: MessageBoxIcon.Error, methodSignature: Helpers.GetCurrentMethod());
            }
        }