コード例 #1
0
ファイル: AppCommon.cs プロジェクト: zezo010/acat
        /// <summary>
        /// Displays dialog to select the preferred theme
        /// </summary>
        /// <returns>true if the user selected a theme</returns>
        public static bool ShowThemeSelectDialog()
        {
            bool retVal = false;

            var theme = ThemeSelectForm.SelectTheme();

            if (!String.IsNullOrEmpty(theme))
            {
                Common.AppPreferences.Theme = theme;
                retVal = true;
            }

            return(retVal);
        }
コード例 #2
0
        /// <summary>
        /// Event handler to change the theme (color scheme)
        /// </summary>
        /// <param name="sender">event sender</param>
        /// <param name="e">event args</param>
        private void buttonColorScheme_Click(object sender, EventArgs e)
        {
            Hide();

            var theme = ThemeSelectForm.SelectTheme();

            if (!String.IsNullOrEmpty(theme))
            {
                if (EvtThemeChanged != null)
                {
                    EvtThemeChanged(this, theme);
                }
            }

            Show();
        }