測試流程要求:如何停止在Silverlight中使用zune播放音樂?
- 播放音樂文件。
- 啓動應用程序。
- 驗證應用程序加載時,它不會暫停,恢復或停止正在播放的音樂。
如何使它在Silverlight中?
我有類似:
protected void CheckMusicPlaying()
{
if (MediaPlayer.State == MediaState.Playing)
{
MessageBoxResult Choice;
Choice = MessageBox.Show("Media is currently playing, do you want to stop it?", "Stop Player", MessageBoxButton.OKCancel);
if (Choice == MessageBoxResult.OK)
MediaPlayer.Stop(); //We simply stop their music so when they click your buttons, only yours is playing.
}
}
和構造:CheckMusicPlaying();
崩潰。
「崩潰」時有什麼異常? –