WIP
DirectOutput framework for virtual pinball cabinets WIP
Go to:
Overview 
Configure.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
4 using System.Data;
5 using System.Drawing;
6 using System.Text;
7 using System.Windows.Forms;
8 
9 namespace PinballX
10 {
11  public partial class Configure : Form
12  {
13 
15  {
16  InitializeComponent();
17  this.Config = Config;
18  Populate();
19  }
20 
21  public Configure()
22  : this(new Config())
23  {
24  }
25 
26 
27 
28 
29  public Config Config { get; set; }
30 
31 
32  private void Populate()
33  {
34 
35  EnableLogCheckBox.Checked=Config.EnableLogging;
36 
37 
38  PopulateDOFState();
39 
40 
41  }
42 
43 
44  private void PopulateDOFState()
45  {
46  DOFManager DM = new DOFManager();
47 
48  string DllPath = "";
49  bool DOFLoaded = false;
50 
51  string DOFVersion = "";
52 
53  try
54  {
55  DM.Load();
56  DOFLoaded = true;
57 
58  }
59  catch
60  {
61  DOFLoaded = false;
62  }
63 
64 
65  if (DOFLoaded)
66  {
67  try
68  {
69  DllPath = DM.GetDllPath();
70  DOFVersion = DM.GetVersion();
71  }
72  catch { }
73  }
74 
75 
76  try
77  {
78  DM.Unload();
79  }
80  catch { }
81 
82  DOFPathText.Text = DllPath;
83  DOFVersionText.Text = DOFVersion;
84  DOFStateText.Text = (DOFLoaded ? "OK. DirectOutput framework found" : "Error! DirectOutput framework not found. Make sure the DOF com object is registered.");
85 
86 
87  }
88 
89  private void EnableLogCheckBox_CheckedChanged(object sender, EventArgs e)
90  {
91  Config.EnableLogging = EnableLogCheckBox.Checked;
92  }
93 
94 
95  }
96 }
bool EnableLogging
Definition: Config.cs:16
Configure(Config Config)
Definition: Configure.cs:14