Beispiel #1
0
 private void SetContentshow()
 {
     if (photosPath.Count > 0)
     {
         string tempPath = photosPath[currentPicture];
         if (VIDEO_EXTENSIONS.Contains("*" + Path.GetExtension(tempPath)))
         {
             photoShowPictureBox.Hide();
             videoShowMediaPlayer.Show();
             videoShowMediaPlayer.settings.autoStart = false;
             videoShowMediaPlayer.URL = tempPath;
         }
         else
         {
             videoShowMediaPlayer.Hide();
             if (videoShowMediaPlayer.URL != null)
             {
                 videoShowMediaPlayer.Ctlcontrols.stop();
             }
             photoShowPictureBox.Show();
             photoShowPictureBox.Image = (Bitmap)Image.FromFile(tempPath);
         }
         textBoxName.Text    = Path.GetFileName(tempPath);
         textBoxPath.Text    = tempPath;
         textBoxCreated.Text = File.GetCreationTime(tempPath).ToString();
         labelCount.Text     = (currentPicture + 1) + "/" + photosPath.Count;
     }
     else
     {
         photoShowPictureBox.Hide();
         videoShowMediaPlayer.Hide();
         labelCount.Text = currentPicture + "/" + photosPath.Count;
         labelShow.Show();
         labelShow.Text = "There are no uploaded \n\t images/videos";
     }
 }