C# Класс CyrusBuilt.MonoPi.Components.Button.ButtonBase

Base class for button device abstraction components.
Наследование: ComponentBase, IButton
Показать файл Открыть проект

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

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

Защищенные методы

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

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

Метод Описание
HoldTimer_Elapsed ( Object sender, System.Timers.ElapsedEventArgs e ) : void

Handles the button hold timer elapsed event.

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

ButtonBase() защищенный Метод

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Button.ButtonBase class. This is the default constructor.
protected ButtonBase ( ) : System
Результат System

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

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

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

Determines whether this button's state is the specified state.
public IsState ( ButtonState state ) : System.Boolean
state ButtonState /// The state to check. ///
Результат System.Boolean

OnHold() защищенный Метод

Raises the ButtonBase.Hold event.
protected OnHold ( ButtonEventArgs e ) : void
e ButtonEventArgs /// The event arguments. ///
Результат void

OnPressed() защищенный Метод

Raises the ButtonBase.Pressed event.
protected OnPressed ( ButtonEventArgs e ) : void
e ButtonEventArgs /// The event arguments. ///
Результат void

OnReleased() защищенный Метод

Raises the ButtonBase.Released event.
protected OnReleased ( ButtonEventArgs e ) : void
e ButtonEventArgs /// The event arguments. ///
Результат void

OnStateChanged() защищенный Метод

Raises the state changed event.
protected OnStateChanged ( ButtonEventArgs e ) : void
e ButtonEventArgs /// The button event arguments. ///
Результат void