DirectOutputR1
DirectOutput framework R1 for virtual pinball cabinets.
Go to:
Overview 
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros Pages
DMXOutput.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.DMX
7 {
12  public class DMXOutput: Output, IOutput
13  {
14  private int _DmxChannel;
15 
23  public int DmxChannel
24  {
25  get
26  {
27  return _DmxChannel;
28  }
29  set
30  {
31  if (_DmxChannel != value)
32  {
33  if (!value.IsBetween(1, 512))
34  {
35  throw new Exception("Dmx channels numbers must be in the range of 1-512. The supplied number {0} is out of range.".Build(value));
36  }
37  if (Name.IsNullOrWhiteSpace() || Name == "DmxChannel {0:000}".Build(_DmxChannel))
38  {
39  Name = "DmxChannel {0:00}".Build(value);
40  }
41  _DmxChannel = value;
42  }
43  }
44  }
45  }
46 }