From 8d57d13c64a255d19a470ebf7d308316ab90868f Mon Sep 17 00:00:00 2001 From: Souryo Date: Sat, 6 Feb 2016 18:35:38 -0500 Subject: [PATCH] UI: Added option to open the Mesen folder (preferences dialog) --- GUI.NET/Forms/Config/frmPreferences.Designer.cs | 17 ++++++++++++++++- GUI.NET/Forms/Config/frmPreferences.cs | 5 +++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/GUI.NET/Forms/Config/frmPreferences.Designer.cs b/GUI.NET/Forms/Config/frmPreferences.Designer.cs index 66840396..cc813a78 100644 --- a/GUI.NET/Forms/Config/frmPreferences.Designer.cs +++ b/GUI.NET/Forms/Config/frmPreferences.Designer.cs @@ -51,6 +51,7 @@ this.chkRemoveSpriteLimit = new System.Windows.Forms.CheckBox(); this.chkFdsAutoLoadDisk = new System.Windows.Forms.CheckBox(); this.chkFdsFastForwardOnLoad = new System.Windows.Forms.CheckBox(); + this.btnOpenMesenFolder = new System.Windows.Forms.Button(); this.tlpMain.SuspendLayout(); this.flowLayoutPanel6.SuspendLayout(); this.tabMain.SuspendLayout(); @@ -77,16 +78,19 @@ this.tlpMain.Controls.Add(this.chkAutoLoadIps, 0, 1); this.tlpMain.Controls.Add(this.flowLayoutPanel6, 0, 0); this.tlpMain.Controls.Add(this.chkDisableScreensaver, 0, 5); + this.tlpMain.Controls.Add(this.btnOpenMesenFolder, 0, 7); this.tlpMain.Dock = System.Windows.Forms.DockStyle.Fill; this.tlpMain.Location = new System.Drawing.Point(3, 3); this.tlpMain.Name = "tlpMain"; - this.tlpMain.RowCount = 6; + this.tlpMain.RowCount = 8; this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tlpMain.Size = new System.Drawing.Size(380, 207); this.tlpMain.TabIndex = 1; // @@ -352,6 +356,16 @@ this.chkFdsFastForwardOnLoad.Text = "Automatically fast forward FDS games when disk or BIOS is loading"; this.chkFdsFastForwardOnLoad.UseVisualStyleBackColor = true; // + // btnOpenMesenFolder + // + this.btnOpenMesenFolder.Location = new System.Drawing.Point(3, 181); + this.btnOpenMesenFolder.Name = "btnOpenMesenFolder"; + this.btnOpenMesenFolder.Size = new System.Drawing.Size(117, 23); + this.btnOpenMesenFolder.TabIndex = 16; + this.btnOpenMesenFolder.Text = "Open Mesen Folder"; + this.btnOpenMesenFolder.UseVisualStyleBackColor = true; + this.btnOpenMesenFolder.Click += new System.EventHandler(this.btnOpenMesenFolder_Click); + // // frmPreferences // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -406,5 +420,6 @@ private System.Windows.Forms.CheckBox chkFdsFastForwardOnLoad; private System.Windows.Forms.CheckBox chkAllowBackgroundInput; private System.Windows.Forms.CheckBox chkPauseOnMovieEnd; + private System.Windows.Forms.Button btnOpenMesenFolder; } } \ No newline at end of file diff --git a/GUI.NET/Forms/Config/frmPreferences.cs b/GUI.NET/Forms/Config/frmPreferences.cs index 85ba48e1..62c08cfd 100644 --- a/GUI.NET/Forms/Config/frmPreferences.cs +++ b/GUI.NET/Forms/Config/frmPreferences.cs @@ -52,5 +52,10 @@ namespace Mesen.GUI.Forms.Config chkAllowBackgroundInput.Checked = false; } } + + private void btnOpenMesenFolder_Click(object sender, EventArgs e) + { + System.Diagnostics.Process.Start(ConfigManager.HomeFolder); + } } }