private void InitialiseWindow()
        {
            try
            {
                ThemeManager.PropagateThemeSelector(kcbTheme);

                knumDarkValue.Value = ConversionMethods.ConvertFloatToDecimal(_colourIntensitySettingsManager.GetDarkestColourIntensity());

                knumMediumValue.Value = ConversionMethods.ConvertFloatToDecimal(_colourIntensitySettingsManager.GetMediumColourIntensity());

                knumLightValue.Value = ConversionMethods.ConvertFloatToDecimal(_colourIntensitySettingsManager.GetLightColourIntensity());

                knumLightestValue.Value = ConversionMethods.ConvertFloatToDecimal(_colourIntensitySettingsManager.GetLightestColourIntensity());

                klblDarkColourFloatValue.Text = ColourHelpers.ReturnFloatAsString(_colourIntensitySettingsManager.GetDarkestColourIntensity());

                klblMediumColourFloatValue.Text = ColourHelpers.ReturnFloatAsString(_colourIntensitySettingsManager.GetMediumColourIntensity());

                klblLightColourFloatValue.Text = ColourHelpers.ReturnFloatAsString(_colourIntensitySettingsManager.GetLightColourIntensity());

                klblLightestColourFloatValue.Text = ColourHelpers.ReturnFloatAsString(_colourIntensitySettingsManager.GetLightestColourIntensity());
            }
            catch (Exception exc)
            {
                ExceptionHandler.CaptureException(exc, icon: MessageBoxIcon.Error, methodSignature: Helpers.GetCurrentMethod());
            }
        }
Beispiel #2
0
        private void UpdateUI(string v)
        {
            cwSelectedColour.Colour = TranslationMethods.RGBStringToColour(v);

            cbxColourPreview.BackColor = TranslationMethods.RGBStringToColour(v);

            ktxtHexValue.Text = ColourHelpers.ColourToHexadecimal(cbxColourPreview.BackColor);

            klblAlphaValue.Text = cbxColourPreview.BackColor.A.ToString();

            klblRedValue.Text = cbxColourPreview.BackColor.R.ToString();

            klblGreenValue.Text = cbxColourPreview.BackColor.G.ToString();

            klblBlueValue.Text = cbxColourPreview.BackColor.B.ToString();
        }
Beispiel #3
0
 private void KbtnGenerate_Click(object sender, EventArgs e)
 {
     cwSelectedColour.Colour = ColourHelpers.GenerateRandomColour();
 }
Beispiel #4
0
 private void KbtnSetColour_Click(object sender, EventArgs e)
 {
     ColourHelpers.SetColour(kcbThemeSelector.Text, cwSelectedColour.Colour);
 }
        private void KnumDarkValue_ValueChanged(object sender, EventArgs e)
        {
            klblDarkColourFloatValue.Text = ColourHelpers.ReturnFloatAsString((float)knumDarkValue.Value);

            cbxDarkColour.BackColor = ColourHelpers.Darken(cbxDarkColour.BackColor, (float)knumDarkValue.Value);
        }
Beispiel #6
0
        private void KtrkAlphaValue_ValueChanged(object sender, EventArgs e)
        {
            ColourHelpers.SetColourAlphaValue(cbxColourPreview.BackColor, ktrkAlphaValue.Value);

            ttInfo.SetToolTip(ktrkAlphaValue, $"Alpha Value: { ktrkAlphaValue.Value }");
        }
Beispiel #7
0
        private void UpdateColour(string text)
        {
            cwSelectedColour.Colour = ColourHelpers.ColourFromHexadecimal(text);

            cbxColourPreview.BackColor = ColourHelpers.ColourFromHexadecimal(text);
        }