WIP
DirectOutput framework for virtual pinball cabinets WIP
Go to:
Overview 
OutputControllerBase.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 using System.Xml.Serialization;
7 
8 namespace DirectOutput.Cab.Out
9 {
10 
16  public abstract class OutputControllerBase : NamedItemBase, IOutputController
17  {
18 
19 
20 
21 
22  private OutputList _Outputs = null;
27  [XmlIgnore]
28  public virtual OutputList Outputs
29  {
30  get { return _Outputs; }
31  set
32  {
33  if (_Outputs != null)
34  {
35  _Outputs.OutputValueChanged -= new OutputList.OutputValueChangedEventHandler(Outputs_OutputValueChanged);
36  }
37 
38  _Outputs = value;
39 
40  if (_Outputs != null)
41  {
42  _Outputs.OutputValueChanged += new OutputList.OutputValueChangedEventHandler(Outputs_OutputValueChanged);
43 
44  }
45 
46  }
47  }
48 
49  private void Outputs_OutputValueChanged(object sender, OutputEventArgs e)
50  {
51  OnOutputValueChanged(e.Output);
52  }
53 
59  protected abstract void OnOutputValueChanged(IOutput Output);
60 
61 
62 
63 
64 
65 
66 
72  public abstract void Init(Cabinet Cabinet);
73 
74 
79  public abstract void Finish();
80 
85  public abstract void Update();
86 
87  }
88 }
Abstract base class for named items. Implements the name property and the necessary events...
OutputValueChangedEventHandler OutputValueChanged
Event fires if the value of any IOutput in the list has changed.
Definition: OutputList.cs:136
List of IOutput objects
Definition: OutputList.cs:13
delegate void OutputValueChangedEventHandler(object sender, OutputEventArgs e)
Handler for the OutputValueChangedEvent.
The namespace DirectOutput.General contains classes for general use.