2 using System.Windows.Forms;
5 namespace DirectOutput.Frontend
16 this.Pinball = Pinball;
17 InitializeComponent();
19 Version V = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
20 DateTime BuildDate =
new DateTime(2000, 1, 1).AddDays(V.Build).AddSeconds(V.Revision * 2);
22 Version.Text =
"Version {0} as of {1}".Build(V.ToString(), BuildDate.ToString(
"yyyy.MM.dd HH:mm"));
24 TableName.Text = (Pinball.
Table.TableName.IsNullOrWhiteSpace() ?
"<No table name set>" : Pinball.
Table.TableName);
25 TableFilename.Text = (Pinball.
Table.TableFilename.IsNullOrWhiteSpace() ?
"<No table file name set>" : Pinball.
Table.TableFilename);
26 TableRomname.Text = (Pinball.
Table.RomName.IsNullOrWhiteSpace() ?
"<No rom name set>" : Pinball.
Table.RomName);
29 GlobalConfigFilename.Text = (Pinball.
GlobalConfig.GlobalConfigFilename.IsNullOrWhiteSpace() ?
"<no global config file set>" : (Pinball.
GlobalConfig.GetGlobalConfigFile().Exists ? Pinball.
GlobalConfig.GlobalConfigFilename :
"<no global config file found>"));
32 switch (Pinball.
Table.ConfigurationSource)
34 case DirectOutput.Table.TableConfigSourceEnum.TableConfigurationFile:
35 TableConfigFilename.Text = Pinball.
Table.TableConfigurationFilename;
37 case DirectOutput.Table.TableConfigSourceEnum.IniFile:
38 TableConfigFilename.Text =
"Table config parsed from LedControl file.";
41 TableConfigFilename.Text =
"<no config file loaded>";
46 if (Pinball.
Cabinet.CabinetConfigurationFilename.IsNullOrWhiteSpace())
48 CabinetConfigFilename.Text =
"<no config file loaded>";
52 CabinetConfigFilename.Text = Pinball.
Cabinet.CabinetConfigurationFilename;
58 public static void Open(Pinball Pinball, Form Owner=null)
62 foreach (Form F
in Application.OpenForms)
80 M.StartPosition = FormStartPosition.CenterParent;
85 private void ShowCabinetConfiguration_Click(
object sender, EventArgs e)
87 foreach (Form F
in Application.OpenForms)
96 CabinetInfo CI =
new CabinetInfo(Pinball.
Cabinet);
97 CI.StartPosition = FormStartPosition.CenterParent;
102 private void ShowTableConfiguration_Click(
object sender, EventArgs e)
104 foreach (Form F
in Application.OpenForms)
106 if (F.GetType() == typeof(TableInfo))
113 TableInfo CI =
new TableInfo(Pinball);
114 CI.StartPosition = FormStartPosition.CenterParent;
121 private void button1_Click(
object sender, EventArgs e)
123 foreach (Form F
in Application.OpenForms)
125 if (F.GetType() == typeof(AvailableToysInfo))
132 AvailableToysInfo CI =
new AvailableToysInfo();
133 CI.StartPosition = FormStartPosition.CenterParent;
137 private void button2_Click(
object sender, EventArgs e)
139 foreach (Form F
in Application.OpenForms)
141 if (F.GetType() == typeof(AvailableEffectsInfo))
148 AvailableEffectsInfo CI =
new AvailableEffectsInfo();
149 CI.StartPosition = FormStartPosition.CenterParent;