Example #1
0
 private void Form_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (char.TryParse(Name, out char c))
     {
         if (e.KeyChar == c)
         {
             SoundForm.PlaySoundAsync();
         }
     }
     if (e.KeyChar == ' ')
     {
         AudioSound.StopAll();
         //Stop sounds
     }
 }
Example #2
0
 private void SelectSound_FormClosed(object sender, FormClosedEventArgs e)
 {
     //Stop sounds
     //if (Sound != null) Sound.Stop();
     AudioSound.StopAll();
 }
Example #3
0
 private void StopButton_Click(object sender, EventArgs e)
 {
     //Stop sounds
     //if (Sound != null) Engine.Init(Sound);
     AudioSound.StopAll();
 }