示例#1
0
        public void MediaPlayerAction(MetaData metaData, LaunchControl action)
        {
            VideoDetails videoOrPptDetails = VideoCollection.Find(x => x.Id == metaData.VideoId);

            if (videoOrPptDetails != null)
            {
                switch (action)
                {
                case LaunchControl.Launch:
                case LaunchControl.Play:
                    mediaPlayer.PlayVideo(videoOrPptDetails);
                    break;

                case LaunchControl.PlayAfterPause:
                    mediaPlayer.PlayAfterPauseVideo();
                    break;

                case LaunchControl.Pause:
                    mediaPlayer.PauseVideo();
                    break;

                case LaunchControl.Stop:
                    mediaPlayer.StopVideo();
                    break;
                }
            }
            else
            {
                MessageBox.Show("Media Not Found");
            }
        }
示例#2
0
        private void SubscribedMessage(Speech.Speech spokenText)
        {
            switch (spokenText.TextSpoken)
            {
            case "Thank you Dodo":
                Speech.SpeechSynthezier speechSynthezier = new Speech.SpeechSynthezier();
                speechSynthezier.Speak("Your welcome and thanks to giving me this oppurtunity");
                VideoDetails videoDetails = VideoCollection.Find(x => x.Id == 13);
                System.Windows.Application.Current.Dispatcher.InvokeAsync(() => { PlayVideo(videoDetails); });
                break;
                //case "Pause the Video Dodo":
                //    System.Windows.Application.Current.Dispatcher.InvokeAsync(() => {
                //        PauseVideo();
                //    });

                //    break;
                //case "Continue video Dodo":
                //    System.Windows.Application.Current.Dispatcher.InvokeAsync(() => {
                //        PlayAfterPauseVideo();
                //    });

                //    break;
                //case "Start gaurdx presentation":
                //    System.Windows.Application.Current.Dispatcher.InvokeAsync(() => {
                //        PptDetails details = PptCollection.Find(x => x.Id == 3);
                //        PptAction(details);
                //    });

                //    break;
                //case "Backward video":
                //    System.Windows.Application.Current.Dispatcher.InvokeAsync(() => {
                //        PositionBackVideo();
                //    });

                //    break;
                //case "Previous Slide Dodo":
                //    System.Windows.Application.Current.Dispatcher.InvokeAsync(() => {
                //        if (objPresSet != null)
                //        {
                //            if (objPresSet.Count > 0)
                //            {
                //                objPres.SlideShowWindow.View.Previous();
                //            }
                //        }
                //    });

                //    break;
                //case "Stop video":
                //    System.Windows.Application.Current.Dispatcher.InvokeAsync(() => {
                //        StopVideo();
                //    });

                //    break;
            }
        }
示例#3
0
        private void powerpnt_SlideShowEnd(powerpointinterop.Presentation Wn)
        {
            Wn.Close();
            VideoDetails videoDetails = null;

            switch (pptDetailsMain.Id)
            {
            case 1:
                //azad exit and rpa video start
                videoDetails = VideoCollection.Find(x => x.Id == 2);
                System.Windows.Application.Current.Dispatcher.InvokeAsync(() => { PlayVideo(videoDetails); });
                break;

            case 2:
                //rpa video
                videoDetails = VideoCollection.Find(x => x.Id == 3);
                System.Windows.Application.Current.Dispatcher.InvokeAsync(() => {
                    PlayVideo(videoDetails);
                });
                break;

            case 3:
                //market data entry bot
                videoDetails = VideoCollection.Find(x => x.Id == 6);
                System.Windows.Application.Current.Dispatcher.InvokeAsync(() => {
                    PlayVideo(videoDetails);
                });
                break;

            case 4:
                //market data ppt end
                videoDetails = VideoCollection.Find(x => x.Id == 7);
                System.Windows.Application.Current.Dispatcher.InvokeAsync(() => {
                    PlayVideo(videoDetails);
                });
                break;

            case 5:
                //market data ends and
                //tech video start
                videoDetails = VideoCollection.Find(x => x.Id == 10);
                System.Windows.Application.Current.Dispatcher.InvokeAsync(() => {
                    PlayVideo(videoDetails);
                });
                break;

            case 6:
                speechRecognize.StartListening();
                subscription = EventAggregator.getInstance().Subscribe <Speech.Speech>(SubscribedMessage);
                break;
            }
        }
示例#4
0
        private void DodoMediaPlayer_MediaEnded(object sender, RoutedEventArgs e)
        {
            VideoDetails videoDetails = null;
            PptDetails   pptDetails   = null;

            this.Hide();
            switch (videoDetailsMain.Id)
            {
            case 0:
                //intro and azadpartika start
                videoDetails = VideoCollection.Find(x => x.Id == 1);
                PlayVideo(videoDetails);
                break;

            case 1:
                //azad pratika ppt
                pptDetails = PptCollection.Find(x => x.Id == 1);
                PptAction(pptDetails);
                break;

            case 2:
                //rpa ppt
                pptDetails = PptCollection.Find(x => x.Id == 2);
                PptAction(pptDetails);
                break;

            case 3:
                videoDetails = VideoCollection.Find(x => x.Id == 4);
                PlayVideo(videoDetails);
                break;

            case 4:
                ////20 secs stop for lizitha
                //Thread.Sleep(new TimeSpan(0, 0, 20));
                //start gaurdx demo video
                videoDetails = VideoCollection.Find(x => x.Id == 5);
                PlayVideo(videoDetails);
                PauseVideo();
                break;

            case 5:
                //open gaurdx ppt
                //pptDetails = PptCollection.Find(x => x.Id == 3);
                //PptAction(pptDetails);
                break;

            case 6:
                //open market data ppt
                pptDetails = PptCollection.Find(x => x.Id == 4);
                PptAction(pptDetails);
                break;

            case 7:
                //open market video 1 ended
                videoDetails = VideoCollection.Find(x => x.Id == 8);
                PlayVideo(videoDetails);
                break;

            case 8:
                //open market video 2 ended
                videoDetails = VideoCollection.Find(x => x.Id == 9);
                PlayVideo(videoDetails);
                break;

            case 9:
                //open market data ppt part 2
                pptDetails = PptCollection.Find(x => x.Id == 5);
                PptAction(pptDetails);
                break;

            case 10:
                //tech video ended q&a video start
                videoDetails = VideoCollection.Find(x => x.Id == 11);
                PlayVideo(videoDetails);
                break;

            case 11:
                //tech video part 2
                videoDetails = VideoCollection.Find(x => x.Id == 12);
                PlayVideo(videoDetails);
                break;

            case 12:
                //tech video
                pptDetails = PptCollection.Find(x => x.Id == 6);
                PptAction(pptDetails);
                break;

            case 13:
                this.Close();
                break;
            }
        }