mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2026-11-12 05:28:00 +00:00
Added the associated device to CorsairLeds
This commit is contained in:
1 parent
925e02f146
commit
d741318462
2 files changed
+12
-5
No files matched your search
@@ -165,7 +165,7 @@ namespace CUE.NET.Devices.Generic
|
|||||||
{
|
{
|
||||||
if (LedMapping.ContainsKey(ledId)) return null;
|
if (LedMapping.ContainsKey(ledId)) return null;
|
||||||
|
|
||||||
CorsairLed led = new CorsairLed(ledId, ledRectangle);
|
CorsairLed led = new CorsairLed(this, ledId, ledRectangle);
|
||||||
LedMapping.Add(ledId, led);
|
LedMapping.Add(ledId, led);
|
||||||
return led;
|
return led;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,10 +17,15 @@ namespace CUE.NET.Devices.Generic
|
|||||||
{
|
{
|
||||||
#region Properties & Fields
|
#region Properties & Fields
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the Device this <see cref="CorsairLed"/> is associated with.
|
||||||
|
/// </summary>
|
||||||
|
public ICueDevice Device { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the key-ID of the Led.
|
/// Gets the key-ID of the Led.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public CorsairLedId Id { get; set; }
|
public CorsairLedId Id { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a rectangle representing the physical location of the led.
|
/// Gets a rectangle representing the physical location of the led.
|
||||||
@@ -63,10 +68,12 @@ namespace CUE.NET.Devices.Generic
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="CorsairLed"/> class.
|
/// Initializes a new instance of the <see cref="CorsairLed"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">The ID of the LED</param>
|
/// <param name="device">The <see cref="ICueDevice"/> the <see cref="CorsairLed"/> is associated with.</param>
|
||||||
/// <param name="ledRectangle">The rectangle representing the physical location of the LED.</param>
|
/// <param name="id">The <see cref="CorsairLedId"/> of the <see cref="CorsairLed"/>.</param>
|
||||||
internal CorsairLed(CorsairLedId id, RectangleF ledRectangle)
|
/// <param name="ledRectangle">The rectangle representing the physical location of the <see cref="CorsairLed"/>.</param>
|
||||||
|
internal CorsairLed(ICueDevice device, CorsairLedId id, RectangleF ledRectangle)
|
||||||
{
|
{
|
||||||
|
this.Device = device;
|
||||||
this.Id = id;
|
this.Id = id;
|
||||||
this.LedRectangle = ledRectangle;
|
this.LedRectangle = ledRectangle;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user