DirectOuput Framework R2
DirectOutput framework R2 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 struct TableElementData
9  {
10 
15 
19  public int Number;
20 
24  public int Value;
25 
26 
33  public TableElementData(TableElementTypeEnum TableElementType, int Number, int Value)
34  {
35  this.TableElementType = TableElementType;
36  this.Number = Number;
37  this.Value = Value;
38  }
39 
40 
47  public TableElementData(Char TableElementTypeChar, int Number, int Value)
48  {
49 
50  if (!Enum.IsDefined(typeof(TableElementTypeEnum), (int)TableElementTypeChar))
51  {
52  Log.Warning("Undefined char \"{0}\" supplied for the TableElementTypeChar.".Build(TableElementTypeChar));
53  this.TableElementType = TableElementTypeEnum.Unknown;
54  }
55  else
56  {
57  this.TableElementType = (TableElementTypeEnum)TableElementTypeChar;
58  }
59  this.Number = Number;
60  this.Value = Value;
61  }
62 
68  {
69  this.Number = TableElement.Number;
70  this.TableElementType = TableElement.TableElementType;
71  this.Value = TableElement.Value;
72  }
73 
74  }
75 }