C# Class CyrusBuilt.MonoPi.Components.Button.ButtonBase

Base class for button device abstraction components.
Inheritance: ComponentBase, IButton
Afficher le fichier Open project: cyrusbuilt/MonoPi

Méthodes publiques

Méthode Description
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Call Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Button.ButtonBase. The Dispose method leaves the CyrusBuilt.MonoPi.Components.Button.ButtonBase in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Button.ButtonBase so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Button.ButtonBase was occupying.

IsState ( ButtonState state ) : System.Boolean

Determines whether this button's state is the specified state.

Méthodes protégées

Méthode Description
ButtonBase ( ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Button.ButtonBase class. This is the default constructor.

OnHold ( ButtonEventArgs e ) : void

Raises the ButtonBase.Hold event.

OnPressed ( ButtonEventArgs e ) : void

Raises the ButtonBase.Pressed event.

OnReleased ( ButtonEventArgs e ) : void

Raises the ButtonBase.Released event.

OnStateChanged ( ButtonEventArgs e ) : void

Raises the state changed event.

Private Methods

Méthode Description
HoldTimer_Elapsed ( Object sender, System.Timers.ElapsedEventArgs e ) : void

Handles the button hold timer elapsed event.

Method Details

ButtonBase() protected méthode

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

Dispose() public méthode

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Call Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Button.ButtonBase. The Dispose method leaves the CyrusBuilt.MonoPi.Components.Button.ButtonBase in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Button.ButtonBase so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Button.ButtonBase was occupying.
public Dispose ( ) : void
Résultat void

IsState() public méthode

Determines whether this button's state is the specified state.
public IsState ( ButtonState state ) : System.Boolean
state ButtonState /// The state to check. ///
Résultat System.Boolean

OnHold() protected méthode

Raises the ButtonBase.Hold event.
protected OnHold ( ButtonEventArgs e ) : void
e ButtonEventArgs /// The event arguments. ///
Résultat void

OnPressed() protected méthode

Raises the ButtonBase.Pressed event.
protected OnPressed ( ButtonEventArgs e ) : void
e ButtonEventArgs /// The event arguments. ///
Résultat void

OnReleased() protected méthode

Raises the ButtonBase.Released event.
protected OnReleased ( ButtonEventArgs e ) : void
e ButtonEventArgs /// The event arguments. ///
Résultat void

OnStateChanged() protected méthode

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