Exemple #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();
        }
Exemple #2
0
 /// <summary>
 /// Registers the theme
 /// </summary>
 /// <param name="theme">Theme to register</param>
 public void RegisterTheme(ThemeInfo <TPropSet> theme)
 {
     _themes[theme.Id] = theme;
 }
Exemple #3
0
 public void Reset()
 {
     _themes.Clear();
     _activeId    = null;
     _activeTheme = default;
 }