C# Class MediaPortal.InputDevices.HidUsageAction

Define the MP actions for various HID usages from a usage page and collection. Expects an XML file with mappings on construction. Maps button code numbers to conditions and actions.
Afficher le fichier Open project: MediaPortal/MediaPortal-1 Class Usage Examples

Méthodes publiques

Méthode Description
AttributeValueToBoolean ( XmlAttribute aAttribute, bool aDefault = false ) : bool

Convert an XML attribute value to boolean

AttributeValueToBoolean ( string aValue, bool aDefault = false ) : bool

ExecuteActionIfNeeded ( ConditionalAction aAction, int aProcessId = -1 ) : bool

Execute the given conditional action if needed.

GetAction ( string aButtonCode, bool aIsBackground, bool aIsRepeat, bool aShift, bool aCtrl, bool aAlt, bool aWin ) : ConditionalAction

/// Get mappings for a given button code based on the current conditions.

HidUsageAction ( ) : System
Load ( XmlNode aXmlNode, TryParseUsage aTryParseUsage ) : void

Load mapping from XML file

Method Details

AttributeValueToBoolean() public static méthode

Convert an XML attribute value to boolean
public static AttributeValueToBoolean ( XmlAttribute aAttribute, bool aDefault = false ) : bool
aAttribute System.Xml.XmlAttribute
aDefault bool
Résultat bool

AttributeValueToBoolean() public static méthode

public static AttributeValueToBoolean ( string aValue, bool aDefault = false ) : bool
aValue string
aDefault bool
Résultat bool

ExecuteActionIfNeeded() public méthode

Execute the given conditional action if needed.
public ExecuteActionIfNeeded ( ConditionalAction aAction, int aProcessId = -1 ) : bool
aAction ConditionalAction The action we want to conditionally execute.
aProcessId int Process-ID for close/kill commands.
Résultat bool

GetAction() public méthode

/// Get mappings for a given button code based on the current conditions.
public GetAction ( string aButtonCode, bool aIsBackground, bool aIsRepeat, bool aShift, bool aCtrl, bool aAlt, bool aWin ) : ConditionalAction
aButtonCode string
aIsBackground bool
aIsRepeat bool
aShift bool
aCtrl bool
aAlt bool
aWin bool
Résultat ConditionalAction

HidUsageAction() public méthode

public HidUsageAction ( ) : System
Résultat System

Load() public méthode

Load mapping from XML file
public Load ( XmlNode aXmlNode, TryParseUsage aTryParseUsage ) : void
aXmlNode System.Xml.XmlNode
aTryParseUsage TryParseUsage
Résultat void