C# Class CUE.NET.Devices.Generic.AbstractCueDevice

Represents a generic CUE-device. (keyboard, mouse, headset, ...)
Inheritance: ICueDevice
Exibir arquivo Open project: DarthAffe/CUE.NET

Public Methods

Method Description
AddEffect ( IEffect effect ) : void

NOT IMPLEMENTED: Effects can't be applied directly to the device. Add it to the Brush or create a ledgroup instead.

AttachLedGroup ( ILedGroup ledGroup ) : bool

Attaches the given ledgroup.

DetachLedGroup ( ILedGroup ledGroup ) : bool

Detaches the given ledgroup.

GetEnumerator ( ) : IEnumerator

Returns an enumerator that iterates over all LEDs of the device.

GetLeds ( ) : IEnumerable

Gets a list containing all LEDs of this group.

Initialize ( ) : void

Initializes the device.

RemoveEffect ( IEffect effect ) : void

NOT IMPLEMENTED: Effects can't be applied directly to the device. Add it to the Brush or create a ledgroup instead.

Update ( bool flushLeds = false ) : void

Performs an update for all dirty keys, or all keys if flushLeds is set to true.

UpdateEffects ( ) : void

NOT IMPLEMENTED: Effects can't be applied directly to the device. Add it to the Brush or create a ledgroup instead.

this ( CorsairLedId ledId ) : CorsairLed

Gets the CorsairLed with the specified ID.

this ( PointF location ) : CorsairLed

Gets the CorsairLed at the given physical location.

this ( RectangleF referenceRect, float minOverlayPercentage = 0.5f ) : IEnumerable

Gets a list of CorsairLed inside the given rectangle.

Protected Methods

Method Description
AbstractCueDevice ( IDeviceInfo info ) : System

Initializes a new instance of the AbstractCueDevice class.

DeviceUpdate ( ) : void

Performs device specific updates.

InitializeLed ( CorsairLedId ledId, RectangleF ledRectangle ) : CorsairLed

Initializes the LED-Object with the specified id.

OnException ( Exception ex ) : void

Handles the needed event-calls for an exception.

OnLedsUpdated ( IEnumerable updatedLeds ) : void

Handles the needed event-calls after the leds are updated.

OnLedsUpdating ( ICollection updatingLeds ) : void

Handles the needed event-calls before the leds are updated.

OnUpdated ( ) : void

Handles the needed event-calls after an update.

OnUpdating ( ) : void

Handles the needed event-calls before updating.

Render ( ILedGroup ledGroup ) : void

Renders a ledgroup.

Private Methods

Method Description
IEnumerable ( ) : IEnumerator

Returns an enumerator that iterates over all LEDs of the device.

ResetLeds ( ) : void

Resets all loaded LEDs back to default.

UpdateLeds ( ICollection updateRequests ) : void

Method Details

AbstractCueDevice() protected method

Initializes a new instance of the AbstractCueDevice class.
protected AbstractCueDevice ( IDeviceInfo info ) : System
info IDeviceInfo The generic information provided by CUE for the device.
return System

AddEffect() public method

NOT IMPLEMENTED: Effects can't be applied directly to the device. Add it to the Brush or create a ledgroup instead.
public AddEffect ( IEffect effect ) : void
effect IEffect The effect to add.
return void

AttachLedGroup() public method

Attaches the given ledgroup.
public AttachLedGroup ( ILedGroup ledGroup ) : bool
ledGroup ILedGroup The ledgroup to attach.
return bool

DetachLedGroup() public method

Detaches the given ledgroup.
public DetachLedGroup ( ILedGroup ledGroup ) : bool
ledGroup ILedGroup The ledgroup to detached.
return bool

DeviceUpdate() protected method

Performs device specific updates.
protected DeviceUpdate ( ) : void
return void

GetEnumerator() public method

Returns an enumerator that iterates over all LEDs of the device.
public GetEnumerator ( ) : IEnumerator
return IEnumerator

GetLeds() public method

Gets a list containing all LEDs of this group.
public GetLeds ( ) : IEnumerable
return IEnumerable

Initialize() public method

Initializes the device.
public Initialize ( ) : void
return void

InitializeLed() protected method

Initializes the LED-Object with the specified id.
protected InitializeLed ( CorsairLedId ledId, RectangleF ledRectangle ) : CorsairLed
ledId CorsairLedId The LED-Id to initialize.
ledRectangle System.Drawing.RectangleF The rectangle representing the position of the LED to initialize.
return CorsairLed

OnException() protected method

Handles the needed event-calls for an exception.
protected OnException ( Exception ex ) : void
ex System.Exception The exception previously thrown.
return void

OnLedsUpdated() protected method

Handles the needed event-calls after the leds are updated.
protected OnLedsUpdated ( IEnumerable updatedLeds ) : void
updatedLeds IEnumerable
return void

OnLedsUpdating() protected method

Handles the needed event-calls before the leds are updated.
protected OnLedsUpdating ( ICollection updatingLeds ) : void
updatingLeds ICollection
return void

OnUpdated() protected method

Handles the needed event-calls after an update.
protected OnUpdated ( ) : void
return void

OnUpdating() protected method

Handles the needed event-calls before updating.
protected OnUpdating ( ) : void
return void

RemoveEffect() public method

NOT IMPLEMENTED: Effects can't be applied directly to the device. Add it to the Brush or create a ledgroup instead.
public RemoveEffect ( IEffect effect ) : void
effect IEffect The effect to remove.
return void

Render() protected method

Renders a ledgroup.
protected Render ( ILedGroup ledGroup ) : void
ledGroup ILedGroup The led group to render.
return void

Update() public method

Performs an update for all dirty keys, or all keys if flushLeds is set to true.
public Update ( bool flushLeds = false ) : void
flushLeds bool Specifies whether all keys (including clean ones) should be updated.
return void

UpdateEffects() public method

NOT IMPLEMENTED: Effects can't be applied directly to the device. Add it to the Brush or create a ledgroup instead.
public UpdateEffects ( ) : void
return void

this() public method

Gets the CorsairLed with the specified ID.
public this ( CorsairLedId ledId ) : CorsairLed
ledId CorsairLedId The ID of the LED to get.
return CorsairLed

this() public method

Gets the CorsairLed at the given physical location.
public this ( PointF location ) : CorsairLed
location System.Drawing.PointF The point to get the location from.
return CorsairLed

this() public method

Gets a list of CorsairLed inside the given rectangle.
public this ( RectangleF referenceRect, float minOverlayPercentage = 0.5f ) : IEnumerable
referenceRect System.Drawing.RectangleF The rectangle to check.
minOverlayPercentage float The minimal percentage overlay a location must have with the to be taken into the list.
return IEnumerable