Example #1
0
        /// <summary>
        /// Sets the theme to the specified one
        /// </summary>
        /// <param name="id">Theme name</param>
        public void SetTheme(string id)
        {
            if (id == _activeId)
            {
                return;
            }
            if (!_themes.TryGetValue(id, out var theme))
            {
                return;
            }

            _activeId    = id;
            _activeTheme = theme;
            OnThemeChanged();
        }
Example #2
0
 /// <summary>
 /// Registers the theme
 /// </summary>
 /// <param name="theme">Theme to register</param>
 public void RegisterTheme(ThemeInfo <TPropSet> theme)
 {
     _themes[theme.Id] = theme;
 }
Example #3
0
 public void Reset()
 {
     _themes.Clear();
     _activeId    = null;
     _activeTheme = default;
 }