Пример #1
0
 public void PptAction(PptDetails pptDetails)
 {
     pptDetailsMain = pptDetails;
     DodoMediaPlayer.Stop();
     this.Hide();
     if (pptDetails != null)
     {
         try
         {
             //Create a new presentation based on a template.
             objApp = new powerpointinterop.Application();
             //  objApp.SlideShowBegin += new Microsoft.Office.Interop.PowerPoint.EApplication_SlideShowBeginEventHandler(powerpnt_SlideShowBegin);
             objApp.SlideShowEnd += new Microsoft.Office.Interop.PowerPoint.EApplication_SlideShowEndEventHandler(powerpnt_SlideShowEnd);
             //objApp.SlideShowNextSlide += new Microsoft.Office.Interop.PowerPoint.EApplication_SlideShowNextSlideEventHandler(powerpnt_SlideShowNextSlide);
             objApp.Visible = MsoTriState.msoTrue;
             objPresSet     = objApp.Presentations;
             string pptName = pptDetails.Name;
             string pptPath = System.IO.Path.Combine(Mocker.debugPath, "Ppts", pptName);
             objPres   = objPresSet.Open(pptPath, MsoTriState.msoTrue, MsoTriState.msoTrue, MsoTriState.msoTrue);
             objSlides = objPres.Slides;
             objSSS    = objPres.SlideShowSettings;
             objSSS.Run();
         }
         catch (Exception)
         {
         }
     }
     else
     {
         MessageBox.Show("Media Not Found");
     }
 }
Пример #2
0
 public void PauseVideo()
 {
     if (DodoMediaPlayer.CanPause)
     {
         DodoMediaPlayer.Pause();
     }
 }
Пример #3
0
 public void StopVideo()
 {
     if (DodoMediaPlayer.Source != null)
     {
         DodoMediaPlayer.Stop();
     }
 }
Пример #4
0
 public void PlayAfterPauseVideo()
 {
     if (DodoMediaPlayer.Source != null && DodoMediaPlayer.Source.OriginalString != string.Empty)
     {
         DodoMediaPlayer.Play();
     }
 }
Пример #5
0
 public void PositionBackVideo()
 {
     if (DodoMediaPlayer.Source != null)
     {
         DodoMediaPlayer.Position = DodoMediaPlayer.Position - new TimeSpan(0, 0, 20);
         DodoMediaPlayer.Play();
     }
 }
Пример #6
0
 public void PlayVideo(VideoDetails videoDetails)
 {
     if (videoDetails != null)
     {
         videoDetailsMain = videoDetails;
         string videoPath = System.IO.Path.Combine(Mocker.debugPath, "Videos", videoDetails.Name);
         DodoMediaPlayer.Source = new Uri(videoPath);
         this.Show();
         DodoMediaPlayer.Play();
     }
 }