在我的异步加载音乐文件完成后,我需要做一些事情。假设我希望程序退出或其他什么。现在音乐结束后我该怎么做?
private void button1_Click(object sender, EventArgs e)
{
player.SoundLocation = @"Music\" + FileList[0];
player.LoadAsync();
}
private void Player_LoadCompleted(object sender, AsyncCompletedEventArgs e)
{
if (player.IsLoadCompleted)
{
player.PlaySync();
}
}