private void OnLectureVideoClick(object sender, RoutedEventArgs e) { if (videoLazyBlock != null) { return; } var lecture = (Coursera.Lecture)((Button)sender).DataContext; videoLazyBlock = new LazyBlock <string>( "video", null, lecture.VideoUrl, _ => false, new LazyBlockUI <string>( this, videoUrl => { try { var launcher = new MediaPlayerLauncher(); launcher.Media = new Uri(videoUrl, UriKind.Absolute); launcher.Show(); } catch (Exception ex) { LittleWatson.ReportException(ex, string.Format("Opening video for lecture '{0}' of course '{1}' ({2})", lecture.Title, pivot.Title, videoUrl)); LittleWatson.CheckForPreviousException(false); } }, () => false, null), false, null, _ => videoLazyBlock = null, null); }
private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e) { LittleWatson.ReportException(e.Exception, "NavigationFailed: " + e.Uri); }
public void OnException(string message, Exception e) { LittleWatson.ReportException(e, message); LittleWatson.CheckForPreviousException(false); }