C# Class Hourglass.Managers.ThemeManager

Manages themes.
Inheritance: Hourglass.Managers.Manager
Afficher le fichier Open project: Dziemborowicz/Hourglass

Méthodes publiques

Свойство Type Description
Instance ThemeManager

Méthodes publiques

Méthode Description
Add ( Theme theme ) : void

Adds a theme.

AddRange ( IEnumerable collection ) : void

Adds the themes of the specified collection.

AddThemeBasedOnTheme ( Theme theme ) : Theme

Adds a theme based on another theme.

GetDarkVariantForTheme ( Theme theme ) : Theme

Returns the dark variant of a theme.

GetLightVariantForTheme ( Theme theme ) : Theme

Returns the light variant of a theme.

GetThemeByIdentifier ( string identifier ) : Theme

Returns the theme for the specified identifier, or null if no such theme is loaded.

GetThemeByName ( string name, System.StringComparison stringComparison = StringComparison.Ordinal ) : Theme

Returns the first theme for the specified name, or null if no such theme is loaded.

GetThemeOrDefaultByIdentifier ( string identifier ) : Theme

Returns the theme for the specified identifier, or DefaultTheme if no such theme is loaded.

GetThemeOrDefaultByName ( string name, System.StringComparison stringComparison = StringComparison.Ordinal ) : Theme

Returns the first theme for the specified name, or DefaultTheme if no such theme is loaded.

Initialize ( ) : void

Initializes the class.

Persist ( ) : void

Persists the state of the class.

Remove ( Theme theme ) : void

Removes a theme, and updates any timers using the theme to use the default theme.

Private Methods

Méthode Description
GetBuiltInThemes ( ) : IList

Loads the collection of themes defined in the assembly.

GetUserProvidedThemes ( ) : IList

Loads the collection of themes defined by the user.

ThemeManager ( ) : System

Prevents a default instance of the ThemeManager class from being created.

Method Details

Add() public méthode

Adds a theme.
public Add ( Theme theme ) : void
theme Hourglass.Timing.Theme A .
Résultat void

AddRange() public méthode

Adds the themes of the specified collection.
public AddRange ( IEnumerable collection ) : void
collection IEnumerable A collection of s.
Résultat void

AddThemeBasedOnTheme() public méthode

Adds a theme based on another theme.
public AddThemeBasedOnTheme ( Theme theme ) : Theme
theme Hourglass.Timing.Theme A .
Résultat Hourglass.Timing.Theme

GetDarkVariantForTheme() public méthode

Returns the dark variant of a theme.
public GetDarkVariantForTheme ( Theme theme ) : Theme
theme Hourglass.Timing.Theme A theme.
Résultat Hourglass.Timing.Theme

GetLightVariantForTheme() public méthode

Returns the light variant of a theme.
public GetLightVariantForTheme ( Theme theme ) : Theme
theme Hourglass.Timing.Theme A theme.
Résultat Hourglass.Timing.Theme

GetThemeByIdentifier() public méthode

Returns the theme for the specified identifier, or null if no such theme is loaded.
public GetThemeByIdentifier ( string identifier ) : Theme
identifier string The identifier for the theme.
Résultat Hourglass.Timing.Theme

GetThemeByName() public méthode

Returns the first theme for the specified name, or null if no such theme is loaded.
public GetThemeByName ( string name, System.StringComparison stringComparison = StringComparison.Ordinal ) : Theme
name string The name for the theme.
stringComparison System.StringComparison One of the enumeration values that specifies how the strings will be /// compared.
Résultat Hourglass.Timing.Theme

GetThemeOrDefaultByIdentifier() public méthode

Returns the theme for the specified identifier, or DefaultTheme if no such theme is loaded.
public GetThemeOrDefaultByIdentifier ( string identifier ) : Theme
identifier string The identifier for the theme.
Résultat Hourglass.Timing.Theme

GetThemeOrDefaultByName() public méthode

Returns the first theme for the specified name, or DefaultTheme if no such theme is loaded.
public GetThemeOrDefaultByName ( string name, System.StringComparison stringComparison = StringComparison.Ordinal ) : Theme
name string The name for the theme.
stringComparison System.StringComparison One of the enumeration values that specifies how the strings will be /// compared.
Résultat Hourglass.Timing.Theme

Initialize() public méthode

Initializes the class.
public Initialize ( ) : void
Résultat void

Persist() public méthode

Persists the state of the class.
public Persist ( ) : void
Résultat void

Remove() public méthode

Removes a theme, and updates any timers using the theme to use the default theme.
public Remove ( Theme theme ) : void
theme Hourglass.Timing.Theme A .
Résultat void

Property Details

Instance public_oe static_oe property

Singleton instance of the ThemeManager class.
public static ThemeManager,Hourglass.Managers Instance
Résultat ThemeManager