Beispiel #1
0
        /// <summary>
        /// Combines the colour values.
        /// </summary>
        /// <param name="baseColour">The base colour.</param>
        /// <param name="darkColour">The dark colour.</param>
        /// <param name="middleColour">The middle colour.</param>
        /// <param name="lightColour">The light colour.</param>
        /// <param name="lightestColour">The lightest colour.</param>
        /// <param name="borderColourPreview">The border colour preview.</param>
        /// <param name="alternativeNormalTextColourPreview">The alternative normal text colour preview.</param>
        /// <param name="normalTextColourPreview">The normal text colour preview.</param>
        /// <param name="disabledTextColourPreview">The disabled text colour preview.</param>
        /// <param name="focusedTextColourPreview">The focused text colour preview.</param>
        /// <param name="pressedTextColourPreview">The pressed text colour preview.</param>
        /// <param name="disabledColourPreview">The disabled colour preview.</param>
        /// <param name="linkNormalColourPreview">The link normal colour preview.</param>
        /// <param name="linkHoverColourPreview">The link hover colour preview.</param>
        /// <param name="linkVisitedColourPreview">The link visited colour preview.</param>
        /// <param name="customColourOne">The custom colour one.</param>
        /// <param name="customColourTwo">The custom colour two.</param>
        /// <param name="customColourThree">The custom colour three.</param>
        /// <param name="customColourFour">The custom colour four.</param>
        /// <param name="customColourFive">The custom colour five.</param>
        /// <param name="customTextColourOne">The custom text colour one.</param>
        /// <param name="customTextColourTwo">The custom text colour two.</param>
        /// <param name="customTextColourThree">The custom text colour three.</param>
        /// <param name="customTextColourFour">The custom text colour four.</param>
        /// <param name="customTextColourFive">The custom text colour five.</param>
        /// <param name="menuTextColour">The menu text colour.</param>
        /// <param name="statusTextColour">The status text colour.</param>
        public static void CombineColourValues(Color baseColour, Color darkColour, Color middleColour, Color lightColour, Color lightestColour, Color borderColourPreview, Color alternativeNormalTextColourPreview, Color normalTextColourPreview, Color disabledTextColourPreview, Color focusedTextColourPreview, Color pressedTextColourPreview, Color disabledColourPreview, Color linkNormalColourPreview, Color linkHoverColourPreview, Color linkVisitedColourPreview, Color customColourOne, Color customColourTwo, Color customColourThree, Color customColourFour, Color customColourFive, Color customTextColourOne, Color customTextColourTwo, Color customTextColourThree, Color customTextColourFour, Color customTextColourFive, Color menuTextColour, Color statusTextColour)
        {
            AllMergedColourSettingsManager colourSettingsManager = new AllMergedColourSettingsManager();

            colourSettingsManager.SetBaseColour(baseColour);

            colourSettingsManager.SetDarkColour(darkColour);

            colourSettingsManager.SetMediumColour(middleColour);

            colourSettingsManager.SetLightColour(lightColour);

            colourSettingsManager.SetLightestColour(lightestColour);

            colourSettingsManager.SetBorderColour(borderColourPreview);

            colourSettingsManager.SetAlternativeNormalTextColour(alternativeNormalTextColourPreview);

            colourSettingsManager.SetNormalTextColour(normalTextColourPreview);

            colourSettingsManager.SetDisabledTextColour(disabledTextColourPreview);

            colourSettingsManager.SetFocusedTextColour(focusedTextColourPreview);

            colourSettingsManager.SetPressedTextColour(pressedTextColourPreview);

            colourSettingsManager.SetDisabledControlColour(disabledColourPreview);

            colourSettingsManager.SetLinkNormalColour(linkNormalColourPreview);

            colourSettingsManager.SetLinkHoverColour(linkHoverColourPreview);

            colourSettingsManager.SetLinkVisitedColour(linkVisitedColourPreview);

            colourSettingsManager.SetCustomColourOne(customColourOne);

            colourSettingsManager.SetCustomColourTwo(customColourTwo);

            colourSettingsManager.SetCustomColourThree(customColourThree);

            colourSettingsManager.SetCustomColourFour(customColourFour);

            colourSettingsManager.SetCustomColourFive(customColourFive);

            colourSettingsManager.SetCustomTextColourOne(customTextColourOne);

            colourSettingsManager.SetCustomTextColourTwo(customTextColourTwo);

            colourSettingsManager.SetCustomTextColourThree(customTextColourThree);

            colourSettingsManager.SetCustomTextColourFour(customTextColourFour);

            colourSettingsManager.SetCustomTextColourFive(customTextColourFive);

            colourSettingsManager.SetMenuTextColour(menuTextColour);

            colourSettingsManager.SetStatusStripTextColour(statusTextColour);

            colourSettingsManager.SaveAllMergedColourSettings();
        }
Beispiel #2
0
        public static void RetrieveAllColourSettingsAsColour()
        {
            AllMergedColourSettingsManager colourSettingsManager = new AllMergedColourSettingsManager();

            try
            {
            }
            catch (Exception exc)
            {
                KryptonMessageBox.Show($"An unexpected error has occurred: { exc.Message }", "Retrieving Settings Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #3
0
        public static void SaveSettings(SettingTypes settingType)
        {
            #region Variables
            AllMergedColourSettingsManager colourSettingsManager = new AllMergedColourSettingsManager();

            //ColourStringSettingsManager colourStringSettingsManager = new ColourStringSettingsManager();

            ColourIntegerSettingsManager colourIntegerSettingsManager = new ColourIntegerSettingsManager();

            GlobalBooleanSettingsManager globalBooleanSettingsManager = new GlobalBooleanSettingsManager();

            GlobalStringSettingsManager globalStringSettingsManager = new GlobalStringSettingsManager();
            #endregion

            try
            {
                switch (settingType)
                {
                case SettingTypes.BOOLEAN:
                    globalBooleanSettingsManager.SaveBooleanSettings();
                    break;

                case SettingTypes.COLOUR:
                    colourSettingsManager.SaveAllMergedColourSettings();
                    break;

                case SettingTypes.COLOURSTRING:
                    //colourStringSettingsManager.SaveColourStringSettings();
                    break;

                case SettingTypes.COLOURINTEGER:
                    colourIntegerSettingsManager.SaveColourIntegerSettings();
                    break;

                case SettingTypes.STRING:
                    globalStringSettingsManager.SaveStringSettings();
                    break;

                case SettingTypes.INTEGER:
                    colourIntegerSettingsManager.SaveColourIntegerSettings();
                    break;

                default:
                    break;
                }
            }
            catch (Exception exc)
            {
                ExceptionHandler.CaptureException(exc, methodSignature: Helpers.GetCurrentMethod());
            }
        }
        /// <summary>
        /// Merges all palette colours.
        /// </summary>
        /// <param name="baseColour">The base colour.</param>
        /// <param name="darkColour">The dark colour.</param>
        /// <param name="middleColour">The middle colour.</param>
        /// <param name="lightColour">The light colour.</param>
        /// <param name="lightestColour">The lightest colour.</param>
        /// <param name="borderColour">The border colour.</param>
        /// <param name="alternativeNormalTextColour">The alternative normal text colour.</param>
        /// <param name="normalTextColour">The normal text colour.</param>
        /// <param name="disabledTextColour">The disabled text colour.</param>
        /// <param name="focusedTextColour">The focused text colour.</param>
        /// <param name="pressedTextColour">The pressed text colour.</param>
        /// <param name="disabledControlColour">The disabled control colour.</param>
        /// <param name="linkNormalColour">The link normal colour.</param>
        /// <param name="linkFocusedColour">The link focused colour.</param>
        /// <param name="linkHoverColour">The link hover colour.</param>
        /// <param name="linkVisitedColour">The link visited colour.</param>
        /// <param name="customColourOne">The custom colour one.</param>
        /// <param name="customColourTwo">The custom colour two.</param>
        /// <param name="customColourThree">The custom colour three.</param>
        /// <param name="customColourFour">The custom colour four.</param>
        /// <param name="customColourFive">The custom colour five.</param>
        /// <param name="customColourSix">The custom colour six.</param>
        /// <param name="customTextColourOne">The custom text colour one.</param>
        /// <param name="customTextColourTwo">The custom text colour two.</param>
        /// <param name="customTextColourThree">The custom text colour three.</param>
        /// <param name="customTextColourFour">The custom text colour four.</param>
        /// <param name="customTextColourFive">The custom text colour five.</param>
        /// <param name="customTextColourSix">The custom text colour six.</param>
        /// <param name="menuTextColour">The menu text colour.</param>
        /// <param name="statusTextColour">The status text colour.</param>
        /// <param name="ribbonTabTextColour">The ribbon tab text colour.</param>
        /// <param name="askForConfirmation">if set to <c>true</c> [ask for confirmation].</param>
        internal static void MergeAllPaletteColours(Color baseColour, Color darkColour, Color middleColour, Color lightColour, Color lightestColour, Color borderColour, Color alternativeNormalTextColour, Color normalTextColour, Color disabledTextColour, Color focusedTextColour, Color pressedTextColour, Color disabledControlColour, Color linkNormalColour, Color linkFocusedColour, Color linkHoverColour, Color linkVisitedColour, Color customColourOne, Color customColourTwo, Color customColourThree, Color customColourFour, Color customColourFive, Color customColourSix, Color customTextColourOne, Color customTextColourTwo, Color customTextColourThree, Color customTextColourFour, Color customTextColourFive, Color customTextColourSix, Color menuTextColour, Color statusTextColour, Color ribbonTabTextColour, bool askForConfirmation = false)
        {
            try
            {
                AllMergedColourSettingsManager manager = new AllMergedColourSettingsManager();

                if (SettingsVarifier.AreAllMergedColourSettingsDefault())
                {
                    MergeAllPaletteColoursIntoOneSettingsFile(baseColour, darkColour, middleColour, lightColour, lightestColour, borderColour, alternativeNormalTextColour, normalTextColour, disabledTextColour, focusedTextColour, pressedTextColour, disabledControlColour, linkNormalColour, linkFocusedColour, linkHoverColour, linkVisitedColour, customColourOne, customColourTwo, customColourThree, customColourFour, customColourFive, customColourSix, customTextColourOne, customTextColourTwo, customTextColourThree, customTextColourFour, customTextColourFive, customTextColourSix, menuTextColour, statusTextColour, ribbonTabTextColour);
                }
                else
                {
                    manager.ResetToDefaults();

                    MergeAllPaletteColoursIntoOneSettingsFile(baseColour, darkColour, middleColour, lightColour, lightestColour, borderColour, alternativeNormalTextColour, normalTextColour, disabledTextColour, focusedTextColour, pressedTextColour, disabledControlColour, linkNormalColour, linkFocusedColour, linkHoverColour, linkVisitedColour, customColourOne, customColourTwo, customColourThree, customColourFour, customColourFive, customColourSix, customTextColourOne, customTextColourTwo, customTextColourThree, customTextColourFour, customTextColourFive, customTextColourSix, menuTextColour, statusTextColour, ribbonTabTextColour);
                }
            }
            catch (Exception exc)
            {
                KryptonMessageBox.Show($"An exeption was thrown: { exc.Message }");
            }
        }
Beispiel #5
0
        public static void KeepColoursBasic(Color baseColour, Color darkColour, Color middleColour, Color lightColour, Color lightestColour, bool saveSettings = true)
        {
            #region Assign variables
            AllMergedColourSettingsManager colourSettingsManager = new AllMergedColourSettingsManager();
            #endregion

            if (saveSettings)
            {
                colourSettingsManager.SetBaseColour(baseColour);

                colourSettingsManager.SetDarkColour(darkColour);

                colourSettingsManager.SetMediumColour(middleColour);

                colourSettingsManager.SetLightColour(lightColour);

                colourSettingsManager.SetLightestColour(lightestColour);

                colourSettingsManager.SaveAllMergedColourSettings();
            }
            else
            {
            }
        }
Beispiel #6
0
        /// <summary>
        /// Sets the colour settings as colour.
        /// </summary>
        /// <param name="colourType">Type of the colour.</param>
        /// <param name="colour">The colour.</param>
        public static void SetColourSettingsAsColour(AllAvailableColourTypes colourType, Color colour)
        {
            AllMergedColourSettingsManager colourSettingsManager = new AllMergedColourSettingsManager();

            switch (colourType)
            {
            case AllAvailableColourTypes.ALTERNATIVENORMALTEXTCOLOUR:
                colourSettingsManager.SetAlternativeNormalTextColour(colour);
                break;

            case AllAvailableColourTypes.BASECOLOUR:
                colourSettingsManager.SetBaseColour(colour);
                break;

            case AllAvailableColourTypes.BORDERCOLOUR:
                colourSettingsManager.SetBorderColour(colour);
                break;

            case AllAvailableColourTypes.CUSTOMCOLOURONE:
                colourSettingsManager.SetCustomColourOne(colour);
                break;

            case AllAvailableColourTypes.CUSTOMCOLOURTWO:
                colourSettingsManager.SetCustomColourTwo(colour);
                break;

            case AllAvailableColourTypes.CUSTOMCOLOURTHREE:
                colourSettingsManager.SetCustomColourThree(colour);
                break;

            case AllAvailableColourTypes.CUSTOMCOLOURFOUR:
                colourSettingsManager.SetCustomColourFour(colour);
                break;

            case AllAvailableColourTypes.CUSTOMCOLOURFIVE:
                colourSettingsManager.SetCustomColourFive(colour);
                break;

            case AllAvailableColourTypes.CUSTOMCOLOURSIX:
                colourSettingsManager.SetCustomColourSix(colour);
                break;

            case AllAvailableColourTypes.CUSTOMTEXTCOLOURONE:
                colourSettingsManager.SetCustomTextColourOne(colour);
                break;

            case AllAvailableColourTypes.CUSTOMTEXTCOLOURTWO:
                colourSettingsManager.SetCustomTextColourTwo(colour);
                break;

            case AllAvailableColourTypes.CUSTOMTEXTCOLOURTHREE:
                colourSettingsManager.SetCustomTextColourThree(colour);
                break;

            case AllAvailableColourTypes.CUSTOMTEXTCOLOURFOUR:
                colourSettingsManager.SetCustomTextColourFour(colour);
                break;

            case AllAvailableColourTypes.CUSTOMTEXTCOLOURFIVE:
                colourSettingsManager.SetCustomTextColourFive(colour);
                break;

            case AllAvailableColourTypes.CUSTOMTEXTCOLOURSIX:
                colourSettingsManager.SetCustomTextColourSix(colour);
                break;

            case AllAvailableColourTypes.DARKESTCOLOUR:
                colourSettingsManager.SetDarkColour(colour);
                break;

            case AllAvailableColourTypes.DISABLEDCONTROLCOLOUR:
                colourSettingsManager.SetDisabledControlColour(colour);
                break;

            case AllAvailableColourTypes.DISABLEDTEXTCOLOUR:
                colourSettingsManager.SetDisabledTextColour(colour);
                break;

            case AllAvailableColourTypes.FOCUSEDTEXTCOLOUR:
                colourSettingsManager.SetFocusedTextColour(colour);
                break;

            case AllAvailableColourTypes.LIGHTCOLOUR:
                colourSettingsManager.SetLightColour(colour);
                break;

            case AllAvailableColourTypes.LIGHTESTCOLOUR:
                colourSettingsManager.SetLightestColour(colour);
                break;

            case AllAvailableColourTypes.LINKDISABLEDCOLOUR:
                colourSettingsManager.SetLinkDisabledColour(colour);
                break;

            case AllAvailableColourTypes.LINKHOVERCOLOUR:
                colourSettingsManager.SetLinkHoverColour(colour);
                break;

            case AllAvailableColourTypes.LINKNORMALCOLOUR:
                colourSettingsManager.SetLinkNormalColour(colour);
                break;

            case AllAvailableColourTypes.LINKVISITEDCOLOUR:
                colourSettingsManager.SetLinkVisitedColour(colour);
                break;

            case AllAvailableColourTypes.MEDIUMCOLOUR:
                colourSettingsManager.SetMediumColour(colour);
                break;

            case AllAvailableColourTypes.MENUTEXTCOLOUR:
                colourSettingsManager.SetMenuTextColour(colour);
                break;

            case AllAvailableColourTypes.NORMALTEXTCOLOUR:
                colourSettingsManager.SetNormalTextColour(colour);
                break;

            case AllAvailableColourTypes.PRESSEDTEXTCOLOUR:
                colourSettingsManager.SetPressedTextColour(colour);
                break;

            case AllAvailableColourTypes.STATUSTEXTCOLOUR:
                colourSettingsManager.SetStatusStripTextColour(colour);
                break;

            default:
                break;
            }
        }
Beispiel #7
0
        /// <summary>
        /// Retrieves the selected colour.
        /// </summary>
        /// <param name="colourType">Type of the colour.</param>
        /// <returns>The chosen colour.</returns>
        public static Color RetrieveSelectedColour(AllAvailableColourTypes colourType)
        {
            Color tempColour = Color.FromArgb(0, 0, 0, 0);

            AllMergedColourSettingsManager colourSettingsManager = new AllMergedColourSettingsManager();

            try
            {
                switch (colourType)
                {
                case AllAvailableColourTypes.ALTERNATIVENORMALTEXTCOLOUR:
                    tempColour = colourSettingsManager.GetAlternativeNormalTextColour();
                    break;

                case AllAvailableColourTypes.BASECOLOUR:
                    tempColour = colourSettingsManager.GetBaseColour();
                    break;

                case AllAvailableColourTypes.BORDERCOLOUR:
                    tempColour = colourSettingsManager.GetBorderColour();
                    break;

                case AllAvailableColourTypes.CUSTOMCOLOURONE:
                    tempColour = colourSettingsManager.GetCustomColourOne();
                    break;

                case AllAvailableColourTypes.CUSTOMCOLOURTWO:
                    tempColour = colourSettingsManager.GetCustomColourTwo();
                    break;

                case AllAvailableColourTypes.CUSTOMCOLOURTHREE:
                    tempColour = colourSettingsManager.GetCustomColourThree();
                    break;

                case AllAvailableColourTypes.CUSTOMCOLOURFOUR:
                    tempColour = colourSettingsManager.GetCustomColourFour();
                    break;

                case AllAvailableColourTypes.CUSTOMCOLOURFIVE:
                    tempColour = colourSettingsManager.GetCustomColourFive();
                    break;

                case AllAvailableColourTypes.CUSTOMCOLOURSIX:
                    tempColour = colourSettingsManager.GetCustomColourSix();
                    break;

                case AllAvailableColourTypes.CUSTOMTEXTCOLOURONE:
                    tempColour = colourSettingsManager.GetCustomTextColourOne();
                    break;

                case AllAvailableColourTypes.CUSTOMTEXTCOLOURTWO:
                    tempColour = colourSettingsManager.GetCustomTextColourTwo();
                    break;

                case AllAvailableColourTypes.CUSTOMTEXTCOLOURTHREE:
                    tempColour = colourSettingsManager.GetCustomTextColourThree();
                    break;

                case AllAvailableColourTypes.CUSTOMTEXTCOLOURFOUR:
                    tempColour = colourSettingsManager.GetCustomTextColourFour();
                    break;

                case AllAvailableColourTypes.CUSTOMTEXTCOLOURFIVE:
                    tempColour = colourSettingsManager.GetCustomTextColourFive();
                    break;

                case AllAvailableColourTypes.CUSTOMTEXTCOLOURSIX:
                    tempColour = colourSettingsManager.GetCustomTextColourSix();
                    break;

                case AllAvailableColourTypes.DARKESTCOLOUR:
                    tempColour = colourSettingsManager.GetDarkColour();
                    break;

                case AllAvailableColourTypes.DISABLEDCONTROLCOLOUR:
                    tempColour = colourSettingsManager.GetDisabledControlColour();
                    break;

                case AllAvailableColourTypes.DISABLEDTEXTCOLOUR:
                    tempColour = colourSettingsManager.GetDisabledTextColour();
                    break;

                case AllAvailableColourTypes.FOCUSEDTEXTCOLOUR:
                    tempColour = colourSettingsManager.GetFocusedTextColour();
                    break;

                case AllAvailableColourTypes.LIGHTCOLOUR:
                    tempColour = colourSettingsManager.GetLightColour();
                    break;

                case AllAvailableColourTypes.LIGHTESTCOLOUR:
                    tempColour = colourSettingsManager.GetLightestColour();
                    break;

                case AllAvailableColourTypes.LINKDISABLEDCOLOUR:
                    tempColour = colourSettingsManager.GetLinkDisabledColour();
                    break;

                case AllAvailableColourTypes.LINKHOVERCOLOUR:
                    tempColour = colourSettingsManager.GetLinkHoverColour();
                    break;

                case AllAvailableColourTypes.LINKNORMALCOLOUR:
                    tempColour = colourSettingsManager.GetLinkNormalColour();
                    break;

                case AllAvailableColourTypes.LINKVISITEDCOLOUR:
                    tempColour = colourSettingsManager.GetLinkVisitedColour();
                    break;

                case AllAvailableColourTypes.MEDIUMCOLOUR:
                    tempColour = colourSettingsManager.GetMediumColour();
                    break;

                case AllAvailableColourTypes.MENUTEXTCOLOUR:
                    tempColour = colourSettingsManager.GetMenuTextColour();
                    break;

                case AllAvailableColourTypes.NORMALTEXTCOLOUR:
                    tempColour = colourSettingsManager.GetNormalTextColour();
                    break;

                case AllAvailableColourTypes.PRESSEDTEXTCOLOUR:
                    tempColour = colourSettingsManager.GetPressedTextColour();
                    break;

                case AllAvailableColourTypes.STATUSTEXTCOLOUR:
                    tempColour = colourSettingsManager.GetStatusStripTextColour();
                    break;

                default:
                    tempColour = Color.FromArgb(0, 0, 0, 0);
                    break;
                }
            }
            catch (Exception exc)
            {
                KryptonMessageBox.Show($"An unexpected error has occurred: { exc.Message }", "Retrieving Settings Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);

                tempColour = Color.FromArgb(0, 0, 0, 0);
            }

            return(tempColour);
        }
        /// <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());
            }
        }
Beispiel #9
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
        }
        /// <summary>
        /// Merges all palette colours into one settings file.
        /// </summary>
        /// <param name="baseColour">The base colour.</param>
        /// <param name="darkColour">The dark colour.</param>
        /// <param name="middleColour">The middle colour.</param>
        /// <param name="lightColour">The light colour.</param>
        /// <param name="lightestColour">The lightest colour.</param>
        /// <param name="borderColour">The border colour.</param>
        /// <param name="alternativeNormalTextColour">The alternative normal text colour.</param>
        /// <param name="normalTextColour">The normal text colour.</param>
        /// <param name="disabledTextColour">The disabled text colour.</param>
        /// <param name="focusedTextColour">The focused text colour.</param>
        /// <param name="pressedTextColour">The pressed text colour.</param>
        /// <param name="disabledControlColour">The disabled control colour.</param>
        /// <param name="linkNormalColour">The link normal colour.</param>
        /// <param name="linkFocusedColour">The link focused colour.</param>
        /// <param name="linkHoverColour">The link hover colour.</param>
        /// <param name="linkVisitedColour">The link visited colour.</param>
        /// <param name="customColourOne">The custom colour one.</param>
        /// <param name="customColourTwo">The custom colour two.</param>
        /// <param name="customColourThree">The custom colour three.</param>
        /// <param name="customColourFour">The custom colour four.</param>
        /// <param name="customColourFive">The custom colour five.</param>
        /// <param name="customColourSix">The custom colour six.</param>
        /// <param name="customTextColourOne">The custom text colour one.</param>
        /// <param name="customTextColourTwo">The custom text colour two.</param>
        /// <param name="customTextColourThree">The custom text colour three.</param>
        /// <param name="customTextColourFour">The custom text colour four.</param>
        /// <param name="customTextColourFive">The custom text colour five.</param>
        /// <param name="customTextColourSix">The custom text colour six.</param>
        /// <param name="menuTextColour">The menu text colour.</param>
        /// <param name="statusTextColour">The status text colour.</param>
        /// <param name="ribbonTabTextColour">The ribbon tab text colour.</param>
        private static void MergeAllPaletteColoursIntoOneSettingsFile(Color baseColour, Color darkColour, Color middleColour, Color lightColour, Color lightestColour, Color borderColour, Color alternativeNormalTextColour, Color normalTextColour, Color disabledTextColour, Color focusedTextColour, Color pressedTextColour, Color disabledControlColour, Color linkNormalColour, Color linkFocusedColour, Color linkHoverColour, Color linkVisitedColour, Color customColourOne, Color customColourTwo, Color customColourThree, Color customColourFour, Color customColourFive, Color customColourSix, Color customTextColourOne, Color customTextColourTwo, Color customTextColourThree, Color customTextColourFour, Color customTextColourFive, Color customTextColourSix, Color menuTextColour, Color statusTextColour, Color ribbonTabTextColour)
        {
            AllMergedColourSettingsManager manager = new AllMergedColourSettingsManager();

            manager.SetBaseColour(baseColour);

            manager.SetDarkColour(darkColour);

            manager.SetMediumColour(middleColour);

            manager.SetLightColour(lightColour);

            manager.SetLightestColour(lightestColour);

            manager.SetBorderColour(borderColour);

            manager.SetAlternativeNormalTextColour(alternativeNormalTextColour);

            manager.SetNormalTextColour(normalTextColour);

            manager.SetDisabledTextColour(disabledTextColour);

            manager.SetFocusedTextColour(focusedTextColour);

            manager.SetPressedTextColour(pressedTextColour);

            manager.SetDisabledControlColour(disabledControlColour);

            manager.SetLinkNormalColour(linkNormalColour);

            manager.SetLinkFocusedColour(linkFocusedColour);

            manager.SetLinkHoverColour(linkHoverColour);

            manager.SetLinkVisitedColour(linkVisitedColour);

            manager.SetCustomColourOne(customColourOne);

            manager.SetCustomColourTwo(customColourTwo);

            manager.SetCustomColourThree(customColourThree);

            manager.SetCustomColourFour(customColourFour);

            manager.SetCustomColourFive(customColourFive);

            manager.SetCustomColourSix(customColourSix);

            manager.SetCustomTextColourOne(customTextColourOne);

            manager.SetCustomTextColourTwo(customTextColourTwo);

            manager.SetCustomTextColourThree(customTextColourThree);

            manager.SetCustomTextColourFour(customTextColourFour);

            manager.SetCustomTextColourFive(customTextColourFive);

            manager.SetCustomTextColourSix(customTextColourSix);

            manager.SetMenuTextColour(menuTextColour);

            manager.SetStatusStripTextColour(statusTextColour);

            manager.SetRibbonTabTextColour(ribbonTabTextColour);

            manager.SaveAllMergedColourSettings(manager.GetAlwaysUsePrompt());
        }
Beispiel #11
0
        public static void PropagateHEXColourValues(KryptonListBox hexValues, bool useUppercase)
        {
            AllMergedColourSettingsManager colourSettingsManager = new AllMergedColourSettingsManager();

            if (useUppercase)
            {
                hexValues.Items.Add($"Base Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetBaseColour()) }");

                hexValues.Items.Add($"Darkest Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetDarkColour()) }");

                hexValues.Items.Add($"Medium Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetMediumColour()) }");

                hexValues.Items.Add($"Light Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetLightColour()) }");

                hexValues.Items.Add($"Lightest Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetLightestColour()) }");

                hexValues.Items.Add($"Border Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetBorderColour()) }");

                hexValues.Items.Add($"Alternative Normal Text Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetAlternativeNormalTextColour()) }");

                hexValues.Items.Add($"Disabled Text Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetDisabledTextColour()) }");

                hexValues.Items.Add($"Normal Text Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetNormalTextColour()) }");

                hexValues.Items.Add($"Focused Text Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetFocusedTextColour()) }");

                hexValues.Items.Add($"Pressed Text Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetPressedTextColour()) }");

                hexValues.Items.Add($"Ribbon Tab Text Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetRibbonTabTextColour()) }");

                hexValues.Items.Add($"Disabled Control Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetDisabledControlColour()) }");

                hexValues.Items.Add($"Link Disabled Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetLinkDisabledColour()) }");

                hexValues.Items.Add($"Link Focused Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetLinkFocusedColour()) }");

                hexValues.Items.Add($"Link Normal Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetLinkNormalColour()) }");

                hexValues.Items.Add($"Link Hover Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetLinkHoverColour()) }");

                hexValues.Items.Add($"Link Visited Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetLinkVisitedColour()) }");

                hexValues.Items.Add($"Menu Text Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetMenuTextColour()) }");

                hexValues.Items.Add($"Status Strip Text Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetStatusStripTextColour()) }");

                hexValues.Items.Add($"Custom Colour One Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomColourOne()) }");

                hexValues.Items.Add($"Custom Colour Two Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomColourTwo()) }");

                hexValues.Items.Add($"Custom Colour Three Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomColourThree()) }");

                hexValues.Items.Add($"Custom Colour Four Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomColourFour()) }");

                hexValues.Items.Add($"Custom Colour Five Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomColourFive()) }");

                hexValues.Items.Add($"Custom Text Colour One Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomTextColourOne()) }");

                hexValues.Items.Add($"Custom Text Colour Two Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomTextColourTwo()) }");

                hexValues.Items.Add($"Custom Text Colour Three Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomTextColourThree()) }");

                hexValues.Items.Add($"Custom Text Colour Four Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomTextColourFour()) }");

                hexValues.Items.Add($"Custom Text Colour Five Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomTextColourFive()) }");
            }
            else
            {
                hexValues.Items.Add($"Base Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetBaseColour()).ToUpper() }");

                hexValues.Items.Add($"Darkest Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetDarkColour()).ToUpper() }");

                hexValues.Items.Add($"Medium Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetMediumColour()).ToUpper() }");

                hexValues.Items.Add($"Light Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetLightColour()).ToUpper() }");

                hexValues.Items.Add($"Lightest Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetLightestColour()).ToUpper() }");

                hexValues.Items.Add($"Border Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetBorderColour()).ToUpper() }");

                hexValues.Items.Add($"Alternative Normal Text Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetAlternativeNormalTextColour()).ToUpper() }");

                hexValues.Items.Add($"Disabled Text Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetDisabledTextColour()).ToUpper() }");

                hexValues.Items.Add($"Normal Text Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetNormalTextColour()).ToUpper() }");

                hexValues.Items.Add($"Focused Text Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetFocusedTextColour()).ToUpper() }");

                hexValues.Items.Add($"Pressed Text Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetPressedTextColour()).ToUpper() }");

                hexValues.Items.Add($"Ribbon Tab Text Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetRibbonTabTextColour()).ToUpper() }");

                hexValues.Items.Add($"Disabled Control Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetDisabledControlColour()).ToUpper() }");

                hexValues.Items.Add($"Link Disabled Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetLinkDisabledColour()).ToUpper() }");

                hexValues.Items.Add($"Link Focused Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetLinkFocusedColour()).ToUpper() }");

                hexValues.Items.Add($"Link Normal Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetLinkNormalColour()).ToUpper() }");

                hexValues.Items.Add($"Link Hover Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetLinkHoverColour()).ToUpper() }");

                hexValues.Items.Add($"Link Visited Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetLinkVisitedColour()).ToUpper() }");

                hexValues.Items.Add($"Menu Text Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetMenuTextColour()).ToUpper() }");

                hexValues.Items.Add($"Status Strip Text Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetStatusStripTextColour()).ToUpper() }");

                hexValues.Items.Add($"Custom Colour One Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomColourOne()).ToUpper() }");

                hexValues.Items.Add($"Custom Colour Two Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomColourTwo()).ToUpper() }");

                hexValues.Items.Add($"Custom Colour Three Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomColourThree()).ToUpper() }");

                hexValues.Items.Add($"Custom Colour Four Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomColourFour()).ToUpper() }");

                hexValues.Items.Add($"Custom Colour Five Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomColourFive()).ToUpper() }");

                hexValues.Items.Add($"Custom Text Colour One Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomTextColourOne()).ToUpper() }");

                hexValues.Items.Add($"Custom Text Colour Two Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomTextColourTwo()).ToUpper() }");

                hexValues.Items.Add($"Custom Text Colour Three Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomTextColourThree()).ToUpper() }");

                hexValues.Items.Add($"Custom Text Colour Four Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomTextColourFour()).ToUpper() }");

                hexValues.Items.Add($"Custom Text Colour Five Colour: { ColorTranslator.ToHtml(colourSettingsManager.GetCustomTextColourFive()).ToUpper() }");
            }
        }
        /// <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
            }
        }
Beispiel #13
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());
            }
        }