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
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;
6 using DirectOutput.General.Generic;
7 
8 namespace DirectOutput.Cab.Out
9 {
10 
16  public abstract class OutputControllerBase : NamedItemBase, IOutputController
17  {
18 
19  private OutputList _Outputs=null;
24  [XmlIgnore]
25  public virtual OutputList Outputs
26  {
27  get { return _Outputs; }
28  set
29  {
30  if (_Outputs != null)
31  {
32  _Outputs.OutputValueChanged -= new OutputList.OutputValueChangedEventHandler(Outputs_OutputValueChanged);
33  }
34 
35  _Outputs = value;
36 
37  if (_Outputs != null)
38  {
39  _Outputs.OutputValueChanged += new OutputList.OutputValueChangedEventHandler(Outputs_OutputValueChanged);
40 
41  }
42 
43  }
44  }
45 
46  private void Outputs_OutputValueChanged(object sender, OutputEventArgs e)
47  {
48  OnOutputValueChanged(e.Output);
49  }
50 
56  protected virtual void OnOutputValueChanged(IOutput Output)
57  {
58 
59  }
60 
61 
62 
63 
64 
65 
66 
72  public abstract void Init(Cabinet Cabinet);
73 
78  public abstract void Finish();
79 
84  public abstract void Update();
85 
86  }
87 }