private void PropagateColourSettingsArray()
        {
            _colourSettingsArray = new ArrayList();

            _colourSettingsArray.Add($"Base Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetBaseColour()) }");

            _colourSettingsArray.Add($"Dark Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetDarkestColour()) }");

            _colourSettingsArray.Add($"Middle Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetMediumColour()) }");

            _colourSettingsArray.Add($"Light Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetLightColour()) }");

            _colourSettingsArray.Add($"Lightest Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetLightestColour()) }");

            _colourSettingsArray.Add($"Border Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetBorderColour()) }");

            _colourSettingsArray.Add($"Disabled Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetDisabledControlColour()) }");

            _colourSettingsArray.Add($"Alternative Normal Text Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetAlternativeNormalTextColour()) }");

            _colourSettingsArray.Add($"Disabled Text Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetDisabledTextColour()) }");

            _colourSettingsArray.Add($"Normal Text Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetNormalTextColour()) }");

            _colourSettingsArray.Add($"Focused Text Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetFocusedTextColour()) }");

            _colourSettingsArray.Add($"Pressed Text Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetPressedTextColour()) }");

            _colourSettingsArray.Add($"Link Disabled Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetLinkDisabledColour()) }");

            _colourSettingsArray.Add($"Link Normal Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetLinkNormalColour()) }");

            _colourSettingsArray.Add($"Link Hover Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetLinkHoverColour()) }");

            _colourSettingsArray.Add($"Link Visited Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetLinkVisitedColour()) }");

            _colourSettingsArray.Add($"Custom Colour One: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetCustomColourOne()) }");

            _colourSettingsArray.Add($"Custom Colour Two: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetCustomColourTwo()) }");

            _colourSettingsArray.Add($"Custom Colour Three: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetCustomColourThree()) }");

            _colourSettingsArray.Add($"Custom Colour Four: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetCustomColourFour()) }");

            _colourSettingsArray.Add($"Custom Colour Five: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetCustomColourFive()) }");

            _colourSettingsArray.Add($"Custom Text Colour One: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetCustomTextColourOne()) }");

            _colourSettingsArray.Add($"Custom Text Colour Two: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetCustomTextColourTwo()) }");

            _colourSettingsArray.Add($"Custom Text Colour Three: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetCustomTextColourThree()) }");

            _colourSettingsArray.Add($"Custom Text Colour Four: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetCustomTextColourFour()) }");

            _colourSettingsArray.Add($"Custom Text Colour Five: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetCustomTextColourFive()) }");

            _colourSettingsArray.Add($"Menu Text Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetMenuTextColour()) }");

            _colourSettingsArray.Add($"Status Text Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetStatusStripTextColour()) }");
        }
        private void PropagateColourSettingsArray()
        {
            _colourSettingsArray = new ArrayList();

            _colourSettingsArray.Add($"Base Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetBaseColour()) }");

            _colourSettingsArray.Add($"Dark Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetDarkestColour()) }");

            _colourSettingsArray.Add($"Middle Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetMediumColour()) }");

            _colourSettingsArray.Add($"Light Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetLightColour()) }");

            _colourSettingsArray.Add($"Lightest Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetLightestColour()) }");

            _colourSettingsArray.Add($"Border Colour: { ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetBorderColour()) }");
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Displays the colour information.
        /// </summary>
        /// <param name="targetControl">The target control.</param>
        /// <param name="showForeColourInformation">if set to <c>true</c> [show fore colour information].</param>
        /// <param name="controlDescription">The control description.</param>
        public static void DisplayColourInformation(Control targetControl, bool showForeColourInformation = false, string controlDescription = "", KryptonLabel output = null)
        {
            // Create a temporary tool tip
            ToolTip toolTipInformation = new ToolTip();

            ConversionMethods _conversionMethods = new ConversionMethods();

            if (showForeColourInformation && controlDescription != "")
            {
                toolTipInformation.SetToolTip(targetControl, $"{ controlDescription }\nBack Colour:\n\nARGB: ({ ColourUtilities.FormatColourARGBString(targetControl.BackColor)})\nRGB: ({ ColourUtilities.FormatColourRGBString(targetControl.BackColor) })\nHexadecimal Value: #{ _conversionMethods.ConvertRGBToHexadecimal(Convert.ToInt32(targetControl.BackColor.R), Convert.ToInt32(targetControl.BackColor.G), Convert.ToInt32(targetControl.BackColor.B)).ToUpper() }\nHue: { targetControl.BackColor.GetHue().ToString() }\nSaturation: { targetControl.BackColor.GetSaturation().ToString() }\nBrightness: { targetControl.BackColor.GetBrightness().ToString() }\n\nFore Colour:\nARGB: ({ ColourUtilities.FormatColourARGBString(targetControl.ForeColor)})\nRGB: ({ ColourUtilities.FormatColourRGBString(targetControl.ForeColor) })\nHexadecimal Value: #{ _conversionMethods.ConvertRGBToHexadecimal(Convert.ToInt32(targetControl.ForeColor.R), Convert.ToInt32(targetControl.ForeColor.G), Convert.ToInt32(targetControl.ForeColor.B)).ToUpper() }\nHue: { targetControl.BackColor.GetHue().ToString() }\nSaturation: { targetControl.BackColor.GetSaturation().ToString() }\nBrightness: { targetControl.BackColor.GetBrightness().ToString() }");

                output.Text = $"Colour values for: { controlDescription }, ARGB: ({ ColourUtilities.FormatColourARGBString(targetControl.BackColor) }), RGB: ({ ColourUtilities.FormatColourRGBString(targetControl.BackColor) })";
            }
            else if (showForeColourInformation)
            {
                toolTipInformation.SetToolTip(targetControl, $"Back Colour:\n\nARGB: ({ ColourUtilities.FormatColourARGBString(targetControl.BackColor)})\nRGB: ({ ColourUtilities.FormatColourRGBString(targetControl.BackColor) })\nHexadecimal Value: #{ _conversionMethods.ConvertRGBToHexadecimal(Convert.ToInt32(targetControl.BackColor.R), Convert.ToInt32(targetControl.BackColor.G), Convert.ToInt32(targetControl.BackColor.B)).ToUpper() }\n\nFore Colour:\nARGB: ({ ColourUtilities.FormatColourARGBString(targetControl.ForeColor)})\nRGB: ({ ColourUtilities.FormatColourRGBString(targetControl.ForeColor) })\nHexadecimal Value: #{ _conversionMethods.ConvertRGBToHexadecimal(Convert.ToInt32(targetControl.ForeColor.R), Convert.ToInt32(targetControl.ForeColor.G), Convert.ToInt32(targetControl.ForeColor.B)).ToUpper() }\nHue: { targetControl.BackColor.GetHue().ToString() }\nSaturation: { targetControl.BackColor.GetSaturation().ToString() }\nBrightness: { targetControl.BackColor.GetBrightness().ToString() }");

                output.Text = $"Colour values for: { controlDescription }, ARGB: ({ ColourUtilities.FormatColourARGBString(targetControl.BackColor) }), RGB: ({ ColourUtilities.FormatColourRGBString(targetControl.BackColor) })";
            }
            else if (controlDescription != "")
            {
                toolTipInformation.SetToolTip(targetControl, $"{ controlDescription }\nARGB: ({ ColourUtilities.FormatColourARGBString(targetControl.BackColor)})\nRGB: ({ ColourUtilities.FormatColourRGBString(targetControl.BackColor) })\nHexadecimal Value: #{ _conversionMethods.ConvertRGBToHexadecimal(Convert.ToInt32(targetControl.BackColor.R), Convert.ToInt32(targetControl.BackColor.G), Convert.ToInt32(targetControl.BackColor.B)).ToUpper() }");

                output.Text = $"Colour values for: { controlDescription }, ARGB: ({ ColourUtilities.FormatColourARGBString(targetControl.BackColor) }), RGB: ({ ColourUtilities.FormatColourRGBString(targetControl.BackColor) })";
            }
            else
            {
                toolTipInformation.SetToolTip(targetControl, $"ARGB: ({ ColourUtilities.FormatColourARGBString(targetControl.BackColor)})\nRGB: ({ ColourUtilities.FormatColourRGBString(targetControl.BackColor) })\nHexadecimal Value: #{ _conversionMethods.ConvertRGBToHexadecimal(Convert.ToInt32(targetControl.BackColor.R), Convert.ToInt32(targetControl.BackColor.G), Convert.ToInt32(targetControl.BackColor.B)).ToUpper() }\nHue: { targetControl.BackColor.GetHue().ToString() }\nSaturation: { targetControl.BackColor.GetSaturation().ToString() }\nBrightness: { targetControl.BackColor.GetBrightness().ToString() }");

                output.Text = $"Colour values for: { controlDescription }, ARGB: ({ ColourUtilities.FormatColourARGBString(targetControl.BackColor) }), RGB: ({ ColourUtilities.FormatColourRGBString(targetControl.BackColor) })";
            }
        }
 private void ColourInformation_Load(object sender, EventArgs e)
 {
     AddColourDetails("Base", ColourUtilities.FormatColourRGBString(_colourSettingsManager.GetBaseColour()));
 }