Implemented a reinitialize-functionality

This commit is contained in:
DarthAffe committed 2016-02-20 10:05:33 +01:00
1 parent b13a08bdf4
commit a64d27c5ae
4 files changed
+98 -5

No files matched your search

+9
View File
@@ -296,6 +296,15 @@ namespace CUE.NET.Devices.Generic
OnException?.Invoke(this, new OnExceptionEventArgs(ex));
}
/// <summary>
/// Resets all loaded LEDs back to default.
/// </summary>
internal void ResetLeds()
{
foreach (CorsairLed led in Leds.Values)
led.Reset();
}
#endregion
}
}
+15 -1
View File
@@ -54,19 +54,33 @@ namespace CUE.NET.Devices.Generic
#endregion
#region Constructors
internal CorsairLed() { }
#endregion
#region Methods
/// <summary>
/// Updates the LED to the requested color.
/// </summary>
internal void Update()
{
_color = RequestedColor;
IsUpdated = false;
}
/// <summary>
/// Resets the LED back to default
/// </summary>
internal void Reset()
{
_color = Color.Transparent;
RequestedColor = Color.Transparent;
IsUpdated = false;
IsLocked = false;
}
#endregion
}
}