C# Класс Hourglass.Managers.ThemeManager

Manages themes.
Наследование: Hourglass.Managers.Manager
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
Instance ThemeManager

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

Add() публичный Метод

Adds a theme.
public Add ( Theme theme ) : void
theme Hourglass.Timing.Theme A .
Результат void

AddRange() публичный Метод

Adds the themes of the specified collection.
public AddRange ( IEnumerable collection ) : void
collection IEnumerable A collection of s.
Результат void

AddThemeBasedOnTheme() публичный Метод

Adds a theme based on another theme.
public AddThemeBasedOnTheme ( Theme theme ) : Theme
theme Hourglass.Timing.Theme A .
Результат Hourglass.Timing.Theme

GetDarkVariantForTheme() публичный Метод

Returns the dark variant of a theme.
public GetDarkVariantForTheme ( Theme theme ) : Theme
theme Hourglass.Timing.Theme A theme.
Результат Hourglass.Timing.Theme

GetLightVariantForTheme() публичный Метод

Returns the light variant of a theme.
public GetLightVariantForTheme ( Theme theme ) : Theme
theme Hourglass.Timing.Theme A theme.
Результат Hourglass.Timing.Theme

GetThemeByIdentifier() публичный Метод

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.
Результат Hourglass.Timing.Theme

GetThemeByName() публичный Метод

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.
Результат Hourglass.Timing.Theme

GetThemeOrDefaultByIdentifier() публичный Метод

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.
Результат Hourglass.Timing.Theme

GetThemeOrDefaultByName() публичный Метод

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.
Результат Hourglass.Timing.Theme

Initialize() публичный Метод

Initializes the class.
public Initialize ( ) : void
Результат void

Persist() публичный Метод

Persists the state of the class.
public Persist ( ) : void
Результат void

Remove() публичный Метод

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 .
Результат void

Описание свойств

Instance публичное статическое свойство

Singleton instance of the ThemeManager class.
public static ThemeManager,Hourglass.Managers Instance
Результат ThemeManager