DirectOutputR1
DirectOutput framework R1 for virtual pinball cabinets.
Go to:
Overview 
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros Pages
TableElementData.cs
Go to the documentation of this file.
1 using System;
2 
3 namespace DirectOutput.Table
4 {
8  public class TableElementData
9  {
16  public TableElementTypeEnum TableElementType { get; set; }
23  public int Number { get; set; }
30  public int Value { get; set; }
31 
36  public TableElementData Clone()
37  {
38  return new TableElementData(TableElementType, Number, Value);
39  }
40 
44  public TableElementData() { }
45 
52  public TableElementData(TableElementTypeEnum TableElementType, int Number, int Value)
53  {
54  this.TableElementType = TableElementType;
55  this.Number = Number;
56  this.Value = Value;
57  }
58 
59 
66  public TableElementData(Char TableElementTypeChar, int Number, int Value)
67  {
68 
69  if (!Enum.IsDefined(typeof(TableElementTypeEnum), (int)TableElementTypeChar))
70  {
71  Log.Warning("Undefined char \"{0}\" supplied for the TableElementTypeChar.".Build(TableElementTypeChar));
72  this.TableElementType = TableElementTypeEnum.Unknown;
73  }
74  else
75  {
76  this.TableElementType = (TableElementTypeEnum)TableElementTypeChar;
77  }
78  this.Number = Number;
79  this.Value = Value;
80  }
81 
87  {
88  this.Number = TableElement.Number;
89  this.TableElementType = TableElement.TableElementType;
90  this.Value = TableElement.Value;
91  }
92 
93  }
94 }