C# Class CyrusBuilt.MonoPi.Components.Lights.DimmableLightBase

Base class for dimmable light component abstractions.
Inheritance: ComponentBase, IDimmableLight
Afficher le fichier Open project: cyrusbuilt/MonoPi

Méthodes publiques

Méthode Description
GetLevelPercentage ( ) : float

Gets the current brightness level percentage.

GetLevelPercentage ( Int32 level ) : float

Gets the current brightness level percentage.

Off ( ) : void

Switches the light off.

On ( ) : void

Switches the light on.

Méthodes protégées

Méthode Description
DimmableLightBase ( ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Lights.DimmableLightBase class. This is the default constructor.

OnLevelChanged ( LightLevelChangeEventArgs e ) : void

Raises the level changed event.

OnStateChanged ( LightStateChangeEventArgs e ) : void

Raises the state changed event.

Method Details

DimmableLightBase() protected méthode

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Lights.DimmableLightBase class. This is the default constructor.
protected DimmableLightBase ( ) : System
Résultat System

GetLevelPercentage() public méthode

Gets the current brightness level percentage.
public GetLevelPercentage ( ) : float
Résultat float

GetLevelPercentage() public méthode

Gets the current brightness level percentage.
public GetLevelPercentage ( Int32 level ) : float
level System.Int32 /// The brightness level. ///
Résultat float

Off() public méthode

Switches the light off.
public Off ( ) : void
Résultat void

On() public méthode

Switches the light on.
public On ( ) : void
Résultat void

OnLevelChanged() protected méthode

Raises the level changed event.
protected OnLevelChanged ( LightLevelChangeEventArgs e ) : void
e LightLevelChangeEventArgs /// The event arguments. ///
Résultat void

OnStateChanged() protected méthode

Raises the state changed event.
protected OnStateChanged ( LightStateChangeEventArgs e ) : void
e LightStateChangeEventArgs /// The event arguments. ///
Résultat void