private void PhoneApplicationPage_BackKeyPress(object sender, System.ComponentModel.CancelEventArgs e) { if (PopupManager.HasPopup()) { PopupManager.OffPopUp(); e.Cancel = true; return; } if (App.DownVideoModel.DowningVideoids != null && App.DownVideoModel.DowningVideoids.Count > 0) { if (MessageBox.Show("还有正在下载的剧集,确定要退出吗?", "", MessageBoxButton.OKCancel) == MessageBoxResult.OK) { App.DownVideoModel.SaveVideoData(); Application.Current.Terminate(); } else { e.Cancel = true; return; } } else { Application.Current.Terminate(); } }