2 using System.Collections.Generic;
56 foreach (
string Data
in LedControlData)
58 if (!Data.IsNullOrWhiteSpace())
60 ParseLedControlData(Data, ThrowExceptions);
82 CC =
new ColorConfig(LedControlData, ThrowExceptions);
87 Log.
Exception(
"Could not parse color config data {0}.".Build(LedControlData),E);
90 throw new Exception(
"Could not parse color config data {0}.".Build(LedControlData),E);
95 if (Contains(CC.
Name))
100 throw new Exception(
"Color {0} has already been defined.".Build(CC.
Name));
122 if (CC.
Name.Equals(ColorName, StringComparison.InvariantCultureIgnoreCase))
void ParseLedControlData(string LedControlData, bool ThrowExceptions=true)
Parses the led control data.
string Name
Gets or sets the name of the color.
The namespace DirectOutput.Cab.Toys contains all toy related classes.
List of color configurations from a ledcontrol.ini file.
A simple logger used to record important events and exceptions.
void ParseLedControlData(IEnumerable< string > LedControlData, bool ThrowExceptions=true)
Parses the led control data.
RGBAColorNamed GetCabinetColor()
Gets a cabinet RGBAColor object representing the values in the ColorConfig object-.
The namespace DirectOutput.Cab contains all cabinet related classes like the Cabinet class itself...
Color configuration from a LedControl file.
bool Contains(string ColorName)
Determines whether the list contains the specified color name.
ColorList GetCabinetColorList()
Gets a cabinet color list for the config colors contained in this list.
The namespace DirectOutput.General contains classes for general use.
static void Exception(string Message, Exception E=null)
Writes a exception message to the log.