private void ShowVideo(object violationNotificationDTO) { var violationNotification = (ViolationNotificationDTO)violationNotificationDTO; string videopath = _client.GetViolationVideoURLById(violationNotification.ViolationNotificationId); ImagePoupVM.SourceURL = "Video"; //(imagePopup.DataContext as ImagePopupViewModel).VideoURL = "http://hubblesource.stsci.edu/sources/video/clips/details/images/hst_1.mpg"; if (videopath != null) { ImagePoupVM.VideoURL = videopath; ImagePoupVM.ShowStream(); //imagePopup.Show(); } }
private void ShowVideo(object violationNotificationDTO) { try { IsControlBusy = true; var violationNotification = (ViolationNotificationDTO)violationNotificationDTO; string videopath = client.GetViolationVideoURLById(violationNotification.ViolationNotificationId); IsControlBusy = false; ImagePoupVM.SourceURL = "Video"; ImagePoupVM.ShowStream(); //(imagePopup.DataContext as ImagePopupViewModel).VideoURL = "http://hubblesource.stsci.edu/sources/video/clips/details/images/hst_1.mpg"; if (videopath != null) { //videopath = @"D:\split.mp4"; ImagePoupVM.VideoURL = videopath; //MediaPlayerWindow mplayer = new MediaPlayerWindow(videopath); //mplayer.Show(); //mplayer.Activate(); //mplayer.Focus(); //mplayer.Topmost = true; //imagePopup.Show(); } } catch (Exception ex) { IsControlBusy = false; throw ex; } }