add back hawk sound when opening About box
This commit is contained in:
parent
51925e7cc9
commit
f94bcb64b1
|
@ -180,6 +180,7 @@
|
|||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "About EmuHawk";
|
||||
this.Load += new System.EventHandler(this.BizBox_Load);
|
||||
this.Shown += new System.EventHandler(this.BizBox_Shown);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
|
|
@ -2,20 +2,26 @@
|
|||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.EmuHawk.Properties;
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Common.IOExtensions;
|
||||
using BizHawk.Emulation.Cores;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
public partial class BizBox : Form
|
||||
{
|
||||
public BizBox()
|
||||
private static readonly byte[] _bizBoxSound = ReflectionCache.EmbeddedResourceStream("Resources.nothawk.wav").ReadAllBytes();
|
||||
private readonly Action<byte[]> _playWavFileCallback;
|
||||
|
||||
public BizBox(Action<byte[]> playWavFileCallback)
|
||||
{
|
||||
InitializeComponent();
|
||||
Icon = Resources.Logo;
|
||||
pictureBox1.Image = Resources.CorpHawk;
|
||||
btnCopyHash.Image = Resources.Duplicate;
|
||||
_playWavFileCallback = playWavFileCallback;
|
||||
}
|
||||
|
||||
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
|
@ -61,6 +67,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
linkLabel2.Text = $"Commit :{VersionInfo.GIT_BRANCH}@{VersionInfo.GIT_SHORTHASH}";
|
||||
}
|
||||
|
||||
private void BizBox_Shown(object sender, EventArgs e)
|
||||
=> _playWavFileCallback(_bizBoxSound);
|
||||
|
||||
private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
Process.Start($"https://github.com/TASEmulators/BizHawk/commit/{VersionInfo.GIT_SHORTHASH}");
|
||||
|
|
|
@ -2287,7 +2287,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void AboutMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var form = new BizBox();
|
||||
using var form = new BizBox(b => Sound.PlayWavFile(new MemoryStream(b, false), 1));
|
||||
this.ShowDialogWithTempMute(form);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue