C# 클래스 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.
파일 보기 프로젝트 열기: MediaPortal/MediaPortal-1 1 사용 예제들

공개 메소드들

메소드 설명
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

메소드 상세

AttributeValueToBoolean() 공개 정적인 메소드

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

AttributeValueToBoolean() 공개 정적인 메소드

public static AttributeValueToBoolean ( string aValue, bool aDefault = false ) : bool
aValue string
aDefault bool
리턴 bool

ExecuteActionIfNeeded() 공개 메소드

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.
리턴 bool

GetAction() 공개 메소드

/// 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
리턴 ConditionalAction

HidUsageAction() 공개 메소드

public HidUsageAction ( ) : System
리턴 System

Load() 공개 메소드

Load mapping from XML file
public Load ( XmlNode aXmlNode, TryParseUsage aTryParseUsage ) : void
aXmlNode System.Xml.XmlNode
aTryParseUsage TryParseUsage
리턴 void