/// <summary> /// Play slideshow /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ButtonPlay_Click(object sender, RoutedEventArgs e) { // Check that slideshow is not empty if (selectedSlideShow != null) { if (selectedSlideShow.Count > 0) { // Check that all files exist bool filesExist = true; for (int i = 0; i < selectedSlideShow.Count; i++) { MediaData mediaData = selectedSlideShow.GetAt(i); if (mediaData != null) { if (!File.Exists(mediaData.FilePathName)) { filesExist = false; } } } // If files exist, play slide show if (filesExist) { List <MediaData> imageCards = selectedSlideShow.GetMediaDataInOrder(); FullScreen fullScreen = new FullScreen(imageCards); fullScreen.Show(); } else { MessageBox.Show("All files does no longer exist", "Error"); } } else { MessageBox.Show("Slideshow is empty", "Error"); } } else { MessageBox.Show("Slideshow does not exist", "Error"); } }