Skip to main content

Interface IButton

Interface describing button classes.

Assembly: Meadow.Contracts.dll
View Source
public interface IButton : ISensor<bool>, ISensor

Properties

LongClickedThreshold

The minimum duration for a long press.

View Source
TimeSpan LongClickedThreshold { get; set; }

State

Returns the current raw state of the switch. If the switch is pressed (connected), returns true, otherwise false.

View Source
bool State { get; }

Events

PressStarted

Raised when a press starts (the button is pushed down; circuit is closed).

View Source
event EventHandler PressStarted
Event Type

System.EventHandler

PressEnded

Raised when a press ends (the button is released; circuit is opened).

View Source
event EventHandler PressEnded
Event Type

System.EventHandler

Clicked

Raised when the button circuit is re-opened after it has been closed (at the end of a “press”.

View Source
event EventHandler Clicked
Event Type

System.EventHandler

LongClicked

Raised when the button circuit is pressed for at least LongClickedThreshold.

View Source
event EventHandler LongClicked
Event Type

System.EventHandler