Class Buttons
The buttons class. Device type that contains group of buttons.
按鈕群類別。包含一組按鈕的裝置類型。
Inheritance
Inherited Members
Namespace: Votanic.vIO
Assembly: Votanic.vIO.dll
Syntax
public abstract class Buttons : Device
Constructors
Buttons()
Declare a buttons.
宣告一個按鈕群。
Declaration
public Buttons()
Buttons(Int32, String, String, Int32, Int32, Single)
Declare a buttons.
宣告一個按鈕群。
Declaration
public Buttons(int index, string name, string address, int channel, int numberOfButton, float holdingDuration = 1F)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Index of buttons |
System.String | name | Name of buttons |
System.String | address | Address of buttons |
System.Int32 | channel | Channel of buttons |
System.Int32 | numberOfButton | Number of button in buttons |
System.Single | holdingDuration | Holding seconds of hold input type |
Fields
numberOfButton
Number of button in buttons.
按鈕群的按鈕數量。
Declaration
[Tooltip("Number of button in buttons.\n按鈕群的按鈕數量。")]
public int numberOfButton
Field Value
Type | Description |
---|---|
System.Int32 |
Methods
ButtonDown(Int32, Boolean)
Return true if the button is pressed.
當按鈕按下時傳回 true。
ButtonDown(0)
Declaration
public virtual bool ButtonDown(int index, bool reversed = false)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Button index |
System.Boolean | reversed | Reverse the result if true |
Returns
Type | Description |
---|---|
System.Boolean |
ButtonHold(Int32, Boolean)
Return true if the button is held for a while.
當按鈕長按一段時間時傳回 true。
ButtonHold(0)
Declaration
public virtual bool ButtonHold(int index, bool reversed = false)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Button index |
System.Boolean | reversed | Reverse the result if true |
Returns
Type | Description |
---|---|
System.Boolean |
ButtonPress(Int32, Boolean)
Return true if the button is pressing.
當按鈕按住時傳回 true。
ButtonPress(0)
Declaration
public abstract bool ButtonPress(int index, bool reversed = false)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Button index |
System.Boolean | reversed | Reverse the result if true |
Returns
Type | Description |
---|---|
System.Boolean |
ButtonTouch(Int32, Boolean)
Return true if the button is touched.
當按鈕被觸碰時傳回 true。
ButtonTouch(0)
Declaration
public virtual bool ButtonTouch(int index, bool reversed = false)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Button index |
System.Boolean | reversed | Reverse the result if true |
Returns
Type | Description |
---|---|
System.Boolean |
ButtonUp(Int32, Boolean)
Return true if the button is released.
當按鈕放開時傳回 true。
ButtonUp(0)
Declaration
public virtual bool ButtonUp(int index, bool reversed = false)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Button index |
System.Boolean | reversed | Reverse the result if true |
Returns
Type | Description |
---|---|
System.Boolean |
SetHoldingDuration(Int32, Single)
Set the holding type target seconds of a button.
設定一個按鈕的長按時間。
SetHoldingDuration(0, 1)
Declaration
public virtual void SetHoldingDuration(int index, float holdingDuration = 1F)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Target index |
System.Single | holdingDuration | Target seconds |
SetHoldingDuration(Single, Boolean)
Set the holding type target seconds of buttons.
設定按鈕群長按輸入類型所需的目標秒數。
SetHoldingDuration(1, true)
Declaration
public virtual void SetHoldingDuration(float holdingDuration = 1F, bool setToAll = false)
Parameters
Type | Name | Description |
---|---|---|
System.Single | holdingDuration | Target seconds |
System.Boolean | setToAll | Set to all input indices if true, else only set to the index using global value
|