diff --git a/GUI.NET/Forms/frmMain.Designer.cs b/GUI.NET/Forms/frmMain.Designer.cs index 42366506..0eea5f55 100644 --- a/GUI.NET/Forms/frmMain.Designer.cs +++ b/GUI.NET/Forms/frmMain.Designer.cs @@ -107,6 +107,7 @@ this.mnuAbout = new System.Windows.Forms.ToolStripMenuItem(); this.menuTimer = new System.Windows.Forms.Timer(this.components); this.dxViewer = new Mesen.GUI.Controls.DXViewer(); + this.mnuRunAllTests = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip.SuspendLayout(); this.SuspendLayout(); // @@ -544,7 +545,8 @@ this.mnuTests.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.mnuTestRun, this.mnuTestRecordFrom, - this.mnuTestStopRecording}); + this.mnuTestStopRecording, + this.mnuRunAllTests}); this.mnuTests.Name = "mnuTests"; this.mnuTests.Size = new System.Drawing.Size(185, 22); this.mnuTests.Text = "Tests"; @@ -661,6 +663,13 @@ this.dxViewer.Size = new System.Drawing.Size(1024, 960); this.dxViewer.TabIndex = 1; // + // mnuRunAllTests + // + this.mnuRunAllTests.Name = "mnuRunAllTests"; + this.mnuRunAllTests.Size = new System.Drawing.Size(193, 22); + this.mnuRunAllTests.Text = "Run all tests"; + this.mnuRunAllTests.Click += new System.EventHandler(this.mnuRunAllTests_Click); + // // frmMain // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -752,6 +761,7 @@ private System.Windows.Forms.ToolStripSeparator toolStripMenuItem10; private System.Windows.Forms.ToolStripSeparator toolStripMenuItem11; private System.Windows.Forms.ToolStripMenuItem mnuPreferences; + private System.Windows.Forms.ToolStripMenuItem mnuRunAllTests; } } diff --git a/GUI.NET/Forms/frmMain.cs b/GUI.NET/Forms/frmMain.cs index ee0e1418..2ab70c2f 100644 --- a/GUI.NET/Forms/frmMain.cs +++ b/GUI.NET/Forms/frmMain.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Data; +using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; @@ -237,9 +238,13 @@ namespace Mesen.GUI.Forms private void LoadROM(string filename) { - ConfigManager.Config.AddRecentFile(filename); - InteropEmu.LoadROM(filename); - UpdateRecentFiles(); + if(File.Exists(filename)) { + ConfigManager.Config.AddRecentFile(filename); + InteropEmu.LoadROM(filename); + UpdateRecentFiles(); + } else { + MessageBox.Show("File not found.", "Mesen", MessageBoxButtons.OK, MessageBoxIcon.Error); + } } private void UpdateMenus() @@ -673,5 +678,10 @@ namespace Mesen.GUI.Forms } ConfigManager.Config.ApplyConfig(); } + + private void mnuRunAllTests_Click(object sender, EventArgs e) + { + Process.Start("TestHelper.exe"); + } } }