From 7b7fa7dc3f402b22ca68084e2e90563f6fcd435d Mon Sep 17 00:00:00 2001 From: lempamo Date: Sun, 26 Mar 2017 08:00:40 -0400 Subject: added shutdown sound --- TimeHACK.Main/Windows95.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'TimeHACK.Main/Windows95.cs') diff --git a/TimeHACK.Main/Windows95.cs b/TimeHACK.Main/Windows95.cs index b72b4f7..5d266ec 100644 --- a/TimeHACK.Main/Windows95.cs +++ b/TimeHACK.Main/Windows95.cs @@ -7,6 +7,9 @@ namespace TimeHACK { public partial class Windows95 : Form { + private SoundPlayer start; + private SoundPlayer stop; + // Init the form public Windows95() { @@ -30,8 +33,8 @@ namespace TimeHACK // Play Windows 95 Start Sound Stream audio = Properties.Resources.Win95Start; - SoundPlayer Win95Start = new SoundPlayer(audio); - Win95Start.Play(); + start = new SoundPlayer(audio); + start.Play(); // Set the StartMenu seperator startmenuitems.Items.Insert(6, new ToolStripSeparator()); @@ -59,6 +62,11 @@ namespace TimeHACK // Shutdown button private void ShutdownToolStripMenuItem_Click(object sender, EventArgs e) { + start.Stop(); + Stream audio = Properties.Resources.tada; + stop = new SoundPlayer(audio); + stop.Play(); + System.Threading.Thread.Sleep(1500); Application.Exit(); } -- cgit v1.2.3