Beispiel #1
0
        /// <summary>
        /// Selects The Theme To Display.
        /// </summary>
        /// <param name="ThemeName">The Theme Name.</param>
        public void SelectTheme(string ThemeName)
        {
            //Make Sure It Exists
            if (!AppThemes.ContainsKey(ThemeName))
            {
                throw new KeyNotFoundException($"The Specified Theme Name, {ThemeName} Could Not Be Located.");
            }

            //Set Theme
            CurrentThemeName = ThemeName;

            //Check If Event Exists
            if (AppThemeChange != null)
            {
                //Update Event
                AppThemeChange.Invoke(this, new ThemeChangeArgs(ThemeName, CurrentTheme));
            }
        }