/// <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) { ColourSettingsManager colourSettingsManager = new ColourSettingsManager(); colourSettingsManager.SetBaseColour(baseColour); colourSettingsManager.SetDarkestColour(darkColour); colourSettingsManager.SetMediumColour(middleColour); colourSettingsManager.SetLightColour(lightColour); colourSettingsManager.SetLightestColour(lightestColour); colourSettingsManager.SetBorderColour(borderColourPreview); colourSettingsManager.SetAlternativeNormalTextColour(alternativeNormalTextColourPreview); colourSettingsManager.SetNormalTextColour(normalTextColourPreview); colourSettingsManager.SetDisabledTextColour(disabledTextColourPreview); colourSettingsManager.SetFocusTextColour(focusedTextColourPreview); colourSettingsManager.SetPressedTextColour(pressedTextColourPreview); colourSettingsManager.SetDisabledColour(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.SetStatusTextColour(statusTextColour); colourSettingsManager.SaveColourSettings(); }
public static void KeepColoursBasic(Color baseColour, Color darkColour, Color middleColour, Color lightColour, Color lightestColour, bool saveSettings = true) { #region Assign variables ColourSettingsManager colourSettingsManager = new ColourSettingsManager(); #endregion if (saveSettings) { colourSettingsManager.SetBaseColour(baseColour); colourSettingsManager.SetDarkestColour(darkColour); colourSettingsManager.SetMediumColour(middleColour); colourSettingsManager.SetLightColour(lightColour); colourSettingsManager.SetLightestColour(lightestColour); colourSettingsManager.SaveColourSettings(); } else { } }
public void SaveSettings(bool useConfirmDialog = false) { try { if (BaseColour != null || DarkColour != null || MiddleColour != null || LightColour != null || LightestColour != null || BorderColourPreview != null || AlternativeNormalTextColourPreview != null || NormalTextColourPreview != null || DisabledTextColourPreview != null || FocusedTextColourPreview != null || PressedTextColourPreview != null || DisabledColourPreview != null || LinkNormalColourPreview != null || LinkHoverColourPreview != null || LinkVisitedColourPreview != null || CustomColourOne != null || CustomColourTwo != null || CustomColourThree != null || CustomColourFour != null || CustomColourFive != null || CustomTextColourOne != null || CustomTextColourTwo != null || CustomTextColourThree != null || CustomTextColourFour != null || CustomTextColourFive != null || MenuTextColour != null || StatusTextColour != null) { _colourSettingsManager.SetBaseColour(BaseColour); _colourSettingsManager.SetDarkestColour(DarkColour); _colourSettingsManager.SetMediumColour(MiddleColour); _colourSettingsManager.SetLightColour(LightColour); _colourSettingsManager.SetLightestColour(LightestColour); _colourSettingsManager.SetBorderColour(BorderColourPreview); _colourSettingsManager.SetAlternativeNormalTextColour(AlternativeNormalTextColourPreview); _colourSettingsManager.SetNormalTextColour(NormalTextColourPreview); _colourSettingsManager.SetDisabledTextColour(DisabledTextColourPreview); _colourSettingsManager.SetFocusTextColour(FocusedTextColourPreview); _colourSettingsManager.SetPressedTextColour(PressedTextColourPreview); _colourSettingsManager.SetDisabledColour(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.SetStatusTextColour(StatusTextColour); _colourSettingsManager.SaveColourSettings(useConfirmDialog); } else { DialogResult result = KryptonMessageBox.Show("One or more colours are not defined, use white & black?", "Non-Defined Colours", MessageBoxButtons.YesNo, MessageBoxIcon.Question); } } catch (Exception error) { KryptonMessageBox.Show($"An error was thrown: { error.Message }", "Error Thrown", MessageBoxButtons.OK, MessageBoxIcon.Error); } }