From 36776bfbff6f15f7239924777651392945ebb2a0 Mon Sep 17 00:00:00 2001 From: James Barnett Date: Thu, 27 Jul 2017 13:02:31 +0100 Subject: Rejig folder structure --- NucLedController/LEDColour.cs | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 NucLedController/LEDColour.cs (limited to 'NucLedController/LEDColour.cs') 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 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; + } + } +} -- cgit v1.2.3