WIP
DirectOutput framework for virtual pinball cabinets WIP
Go to:
Overview 
LEDWizOutput.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 
6 namespace DirectOutput.Cab.Out.LW
7 {
8 
12  public class LedWizOutput : Output, IOutput
13  {
14 
15  private int _LedWizOutputNumber;
23  public int LedWizOutputNumber
24  {
25  get
26  {
27  return _LedWizOutputNumber;
28  }
29  set
30  {
31  if (_LedWizOutputNumber != value)
32  {
33  if (!value.IsBetween(1, 32))
34  {
35  throw new Exception("LedWiz output numbers must be in the range of 1-32. The supplied number {0} is out of range.".Build(value));
36  }
37  if (Name.IsNullOrWhiteSpace() || Name == "LedWizOutput {0:00}".Build(_LedWizOutputNumber))
38  {
39  Name = "LedWizOutput {0:00}".Build(value);
40  }
41  _LedWizOutputNumber = value;
42  }
43  }
44  }
45 
46 
47  #region Constructor
48  public LedWizOutput()
52  {
53 
54  }
55 
59  public LedWizOutput(int LedWizOutputNumber)
60  {
61 
62  this.LedWizOutputNumber = LedWizOutputNumber;
63  //TODO: Generate unique output names
64  this.Name = string.Format("LedWizOutput {0:00}", LedWizOutputNumber);
65  this.Value = 0;
66  }
67  #endregion
68  }
69 }
Common interface for outputs of any output controller. The Output class implements this interface and...
Definition: IOutput.cs:10
Output class for LedWiz output controllers.
Definition: LEDWizOutput.cs:12
LedWizOutput(int LedWizOutputNumber)
LedWizOutput instance with the specified LedWizOutputNumber
Definition: LEDWizOutput.cs:59
Basic IOutput implementation.
Definition: Output.cs:14