diff options
| author | James Barnett <james.barnett@fivium.co.uk> | 2017-07-27 13:02:31 +0100 |
|---|---|---|
| committer | James Barnett <james.barnett@fivium.co.uk> | 2017-07-27 13:02:31 +0100 |
| commit | 36776bfbff6f15f7239924777651392945ebb2a0 (patch) | |
| tree | 8e4c75b40bc45b888773cac33c9bbbf165da6fd9 /NucLedController/LEDColour.cs | |
| parent | b9c3039f0787c9ede5abf0da750615e4eced8f60 (diff) | |
| download | intel-nuc-led-controller-0.1.tar.xz intel-nuc-led-controller-0.1.zip | |
Rejig folder structurev0.1
Diffstat (limited to 'NucLedController/LEDColour.cs')
| -rw-r--r-- | NucLedController/LEDColour.cs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/NucLedController/LEDColour.cs b/NucLedController/LEDColour.cs new file mode 100644 index 0000000..68fb22c --- /dev/null +++ b/NucLedController/LEDColour.cs @@ -0,0 +1,34 @@ +using System.Collections.Immutable; + +namespace NucLedController +{ + sealed class LEDColour + { + + public static readonly ImmutableList<LEDColour> AvailableColours = ImmutableList.Create( + new LEDColour("CYAN", "Cyan", 0x01), + new LEDColour("PINK", "Pink", 0x02), + new LEDColour("YELLOW", "Yellow", 0x03), + new LEDColour("BLUE", "Blue", 0x04), + new LEDColour("RED", "Red", 0x05), + new LEDColour("GREEN", "Green", 0x06), + new LEDColour("WHITE", "White", 0x07) + ); + + public string Identifier { get; } + public string DisplayName { get; } + public byte ByteValue { get; } + + private LEDColour(string identifier, string displayName, byte byteValue) + { + Identifier = identifier; + DisplayName = displayName; + ByteValue = byteValue; + } + + public override string ToString() + { + return this.Identifier + this.ByteValue; + } + } +} |