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

Base class for dimmable light component abstractions.
Inheritance: ComponentBase, IDimmableLight
Datei anzeigen Open project: cyrusbuilt/MonoPi

Public Methods

Method 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.

Protected Methods

Method 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 method

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

GetLevelPercentage() public method

Gets the current brightness level percentage.
public GetLevelPercentage ( ) : float
return float

GetLevelPercentage() public method

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

Off() public method

Switches the light off.
public Off ( ) : void
return void

On() public method

Switches the light on.
public On ( ) : void
return void

OnLevelChanged() protected method

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

OnStateChanged() protected method

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