1
0
mirror of https://github.com/DarthAffe/CUE.NET.git synced 2025-12-13 00:58:31 +00:00
CUE.NET/Devices/Generic/CorsairLed.cs
2015-09-22 23:12:19 +02:00

52 lines
1.1 KiB
C#

using System.Drawing;
using CUE.NET.Helper;
namespace CUE.NET.Devices.Generic
{
public class CorsairLed
{
#region Properties & Fields
public bool IsDirty => RequestedColor != _color;
public bool IsUpdated { get; private set; }
public Color RequestedColor { get; private set; } = Color.Transparent;
private Color _color = Color.Transparent;
public Color Color
{
get { return _color; }
set
{
if (!IsLocked)
{
RequestedColor = RequestedColor.Blend(value);
IsUpdated = true;
}
}
}
public bool IsLocked { get; set; } = false;
//TODO DarthAffe 19.09.2015: Add effects and stuff
#endregion
#region Constructors
internal CorsairLed() { }
#endregion
#region Methods
internal void Update()
{
_color = RequestedColor;
IsUpdated = false;
}
#endregion
}
}