private void Form1_FormClosed(object sender, FormClosedEventArgs e) { if (MediaPlayer1.Status != VFMediaPlayerStatus.Free) { MediaPlayer1.Stop(); } if (MediaPlayer2.Status != VFMediaPlayerStatus.Free) { MediaPlayer2.Stop(); } }
private void WhenExit() { if (hasPath1) { MediaPlayer1.Stop(); } if (hasPath2) { MediaPlayer2.Stop(); } if (hasPath3) { MediaPlayer3.Stop(); } }