Inferred sound handling

This commit is contained in:
2022-07-13 22:59:19 +02:00
parent 49a8dec39e
commit 30625845d1
2 changed files with 28 additions and 0 deletions

View File

@ -1,3 +1,5 @@
using System.Media;
namespace WinGreed
{
public partial class frmStart : Form
@ -64,5 +66,17 @@ namespace WinGreed
btnAddOk.Visible = false;
}
}
private void PlaySomething()
{
var soundPlayer = new SoundPlayer();
soundPlayer.SoundLocation = @"C:\Users\tommy\Downloads\smartsound_HUMAN_CROWD_Applause_Short.wav";
soundPlayer.Play();
}
private void btnSound_Click(object sender, EventArgs e)
{
PlaySomething();
}
}
}