WIP
DirectOutput framework for virtual pinball cabinets WIP
Go to:
Overview 
Program.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
8 using DirectOutput.Cab;
10 
11 namespace Test
12 {
13  class Program
14  {
15  static void Main(string[] args)
16  {
17 
18  Cabinet C = new Cabinet();
19  Curve CU = new Curve()
20  {
21  Name="Binary0Curve"
22  };
23 
24 
25  CU.Data[0] = 0;
26  for (int i = 1; i < 256; i++)
27  {
28  CU.Data[i] = 255;
29  }
30 
31  C.Curves.Add(CU);
32 
33 
34  CU = new Curve()
35  {
36  Name = "SinusCurve"
37  };
38 
39 
40  CU.Data[0] = 255;
41  for (int i = 0; i < 256; i++)
42  {
43  CU.Data[i] = (byte)(Math.Round(Math.Sin(Math.PI / 128 * i - Math.PI / 2) * 128 + 128, 0));
44  }
45 
46  C.Curves.Add(CU);
47 
48  C.SaveConfigXmlFile("test.xml");
49 
50  }
51  }
52 }
The Cabinet object describes the parts of a pinball cabinet (toys, outputcontrollers, outputs and more).
Definition: Cabinet.cs:17
CurveList Curves
List of named curve objects used to set Curves for toys.
Definition: Cabinet.cs:137
void SaveConfigXmlFile(string FileName)
Serializes the cabinet configuration to a XML file.
Definition: Cabinet.cs:213
The namespace DirectOutput.Cab contains all cabinet related classes like the Cabinet class itself...
Definition: Cab.cs:16
Definition: Program.cs:11
byte[] Data
Gets or sets the curve data array. The curve array must have 256 elements.
Definition: Curve.cs:80
Represents a curve which can be used to map values (e.g. adjust a brighnetss value of a led to the br...
Definition: Curve.cs:15
The namespace FX contains effect related classes. Effects can be assigned directly to a Table and wi...
The namespace DirectOutput.General contains classes for general use.
Effects in this namespace are controlling toys which implement the IMatrix interface ...