/// <summary> /// Plays the sound. Changes the button from "Play" to "Stop" while the sound is being played /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mPlayButton_Click(object sender, EventArgs e) { SoundInfo info = this.SelectedSound; if (info == null || !info.IsPlayable()) { return; } if (!info.IsPlaying()) { info.Play(this); mPlayButton.Text = "Stop"; info.OnStopped += new SoundInfo.OnSoundEventHandler(SoundInfo_OnStopped); } else { info.Stop(); } }