Exemple #1
0
        private void comboBoxTheme_SelectedIndexChanged(object sender, EventArgs e) // theme selected..
        {
            string themename = comboBoxTheme.Items[comboBoxTheme.SelectedIndex].ToString();

            string fontwanted = null;                                               // don't check custom, only a stored theme..

            if (!themename.Equals("Custom") && !_discoveryForm.theme.IsFontAvailableInTheme(themename, out fontwanted))
            {
                DialogResult res = ExtendedControls.MessageBoxTheme.Show("The font used by this theme is not available on your system" + Environment.NewLine +
                                                                         "The font needed is \"" + fontwanted + "\"" + Environment.NewLine +
                                                                         "Install this font and you can use this scheme." + Environment.NewLine +
                                                                         "EuroCaps font is available www.edassets.org.",
                                                                         "Warning", MessageBoxButtons.OK);

                _discoveryForm.theme.SetCustom();                              // go to custom theme whatever
                SetEntryThemeComboBox();
                return;
            }

            if (!_discoveryForm.theme.SetThemeByName(themename))
            {
                _discoveryForm.theme.SetCustom();                                   // go to custom theme..
            }
            SetEntryThemeComboBox();
            _discoveryForm.ApplyTheme();
        }