2 using System.Collections.Generic;
4 namespace DirectOutput.LedControl.Loader
19 public int Number {
get;
set; }
22 private int _FirstOutputNumber;
30 public int FirstOutputNumber
32 get {
return _FirstOutputNumber; }
33 set { _FirstOutputNumber = value; }
43 public bool AnalogOutputRequired
68 public int RequiredOutputCount
71 int RequiredOutputCount = 1;
76 RequiredOutputCount = 3;
80 return RequiredOutputCount; }
96 public bool ParseColumnData(
string ColumnData,
bool ThrowExceptions =
false)
98 bool ExceptionOccured =
false;
99 List<string> ColumnConfigs =
new List<string>(ColumnData.Split(
new char[] {
'/' }, StringSplitOptions.None));
101 foreach (
string CC
in ColumnConfigs)
103 if (!CC.IsNullOrWhiteSpace())
115 ExceptionOccured =
true;
116 Log.
Exception(
"Could not parse setting {0} in column data {1}.".Build(CC, ColumnData), E);
119 throw new Exception(
"Could not parse setting {0} in column data {1}.".Build(CC, ColumnData), E);
124 return !ExceptionOccured;
138 this.Number = ColumnNumber;
139 ParseColumnData(ColumnData, ThrowExceptions);