41 this.TableElementType = TableElementType;
59 Log.
Warning(
"Undefined char \"{0}\" supplied for the TableElementTypeChar.".Build(TableElementTypeChar));
77 this.Number = TableElement.
Number;
79 this.Name = TableElement.
Name;
80 this.Value = TableElement.
Value;
85 if (TableElementName.Length > 1 && Enum.IsDefined(typeof(
TableElementTypeEnum), (
int)TableElementName[0]) && TableElementName[0]!=(char)
TableElementTypeEnum.NamedElement && TableElementName.Substring(1).IsInteger())
89 this.Number = TableElementName.Substring(1).ToInteger();
96 this.Name = (TableElementName[0] != (char)
TableElementTypeEnum.NamedElement?TableElementName:TableElementName.Substring(1));
97 this.Number =
int.MinValue;
TableElementTypeEnum TableElementType
The type of the table element.
int Number
Number of the TableElement.
TableElementData(Char TableElementTypeChar, int Number, int Value)
Initializes a new instance of the TableElementData class.
int Number
The number of the table element.
static void Warning(string Message)
Writes a warning message to the log.
TableElementTypeEnum
Enum for the different TableElement types.
A simple logger used to record important events and exceptions.
int Value
The value of the table element.
TableElementData(TableElementTypeEnum TableElementType, int Number, int Value)
Initializes a new instance of the TableElementData class.
string Name
Name of the TableElement. Triggers NameChanged if value is changed.
Data representing the state of a table emlement
TableElementData(TableElement TableElement)
Initializes a new instance of the TableElementData class from the data in a TableElement.
TableElementTypeEnum TableElementType
Type of the TableElement.
string Name
The name of the table element
Represents a element (e.g. Switch, Solenoid) of a pinball table
TableElementData(string TableElementName, int Value)
int Value
Value of the TableElement. Triggers ValueChanged if the value is changed.