Exemplo n.º 1
0
        void Application_SlideShowBegin(PowerPoint.SlideShowWindow Wn)
        {
            this.slideShow = Wn;

            this.pointer                   = Wn.View.Slide.Shapes.AddShape(Office.MsoAutoShapeType.msoShapeOval, 0, 0, 13, 13);
            this.pointer.ShapeStyle        = Office.MsoShapeStyleIndex.msoShapeStylePreset12;
            this.pointer.Fill.Transparency = 0.2f;

            Wn.View.PointerType = PpSlideShowPointerType.ppSlideShowPointerNone;

            //Si on souhaite que les transitions soient optimisé pour kinect via la checkbox du ruban
            if (this.ribbon.chkTransition.Checked == true)
            {
                //Sauvegarde les slides pour les modifications effectuée pour kinect. Tableau commencant à 1, le 0 est vide (Slide de 1 -> x)
                this.transitionsBackup = new SlideShowTransitionBackup[this.Application.ActivePresentation.Slides.Count + 1];

                for (int i = 1; i <= this.Application.ActivePresentation.Slides.Count; i++)
                {
                    Slide currentSlide = this.Application.ActivePresentation.Slides[i];

                    //Sauvegarde de la slide
                    this.transitionsBackup[i] = new SlideShowTransitionBackup
                    {
                        EntryEffect = currentSlide.SlideShowTransition.EntryEffect,
                        Duration    = currentSlide.SlideShowTransition.Duration
                    };

                    //Modifie les transitions
                    currentSlide.SlideShowTransition.Duration    = kinectTransitionDuration;
                    currentSlide.SlideShowTransition.EntryEffect = kinectEntryEffect;
                }
            }
        }
Exemplo n.º 2
0
 private void ObjName_SlideShowBegin(PowerPoint.SlideShowWindow Wn)
 {
     s.Start();
     secTimer.Start();
     minTimer.Start();
     hrTimer.Start();
 }
Exemplo n.º 3
0
        void app_SlideShowBegin(PowerPoint.SlideShowWindow Wn)
        {
            Thread.Sleep(5000);
            Wn.View.GotoSlide(2);

            Debug.WriteLine("On commence");
        }
Exemplo n.º 4
0
 void application_SlideShowNextSlide(PowerPoint.SlideShowWindow Wn)
 {
     if (Wn == this.presentation.SlideShowWindow)
     {
         base.OnSlideIndexChanged();
     }
 }
Exemplo n.º 5
0
        private void Powerpoint_SlideShowNextSlide(pp.SlideShowWindow Wn)
        {
            try
            {
                slideIndex = Wn.View.Slide.SlideIndex;

                // get current new slide index
                var   index = Wn.View.Slide.SlideIndex;
                Image screen;

                var previousIndex = Wn.View.LastSlideViewed.SlideIndex;
                currentScreenIndex = index;

                if (slideScreenshots.TryGetValue(previousIndex, out screen))
                {
                    screenshotList.Insert(0, screen);
                    if (screenshotList.Count > screenCount)
                    {
                        screenshotList[screenshotList.Count - 1].Dispose();
                        screenshotList.RemoveAt(screenshotList.Count - 1);
                    }
                }
            }
            catch (Exception ex)
            {
                // do nothing
                logger.Error("Exception during next slide.", ex);
            }

            updateHistoryDialogs();
        }
Exemplo n.º 6
0
        /// <summary>
        /// Méthode déclenchée lorsque le slideshow commence (mode diaporama)
        /// </summary>
        /// <param name="Wn">La page du slideshow, soit le diaporama en cours. C'est dans cette classe qu'on peut changer manuellement de slide, etc...</param>
        private void Application_SlideShowBegin(PowerPoint.SlideShowWindow Wn)
        {
            if (this.pointer == null && this.ribbon.chkPointer.Checked)
            {
                this.createPointer(Wn.View.Slide);
            }


            this.slideShow = Wn;

            //Si on souhaite que les transitions soient optimisé pour kinect via la checkbox du ruban
            if (this.ribbon.chkTransition.Checked == true)
            {
                //Sauvegarde les slides pour les modifications effectuée pour kinect. Tableau commencant à 1, le 0 est vide (Slide de 1 -> x)
                this.transitionsBackup = new SlideShowTransitionBackup[this.Application.ActivePresentation.Slides.Count + 1];

                for (int i = 1; i <= this.Application.ActivePresentation.Slides.Count; i++)
                {
                    Slide currentSlide = this.Application.ActivePresentation.Slides[i];

                    //Sauvegarde de la slide
                    this.transitionsBackup[i] = new SlideShowTransitionBackup
                    {
                        EntryEffect = currentSlide.SlideShowTransition.EntryEffect,
                        Duration    = currentSlide.SlideShowTransition.Duration
                    };

                    //Modifie les transitions
                    currentSlide.SlideShowTransition.Duration    = kinectTransitionDuration;
                    currentSlide.SlideShowTransition.EntryEffect = kinectEntryEffect;
                }
            }
        }
Exemplo n.º 7
0
        private void ShowTextOnNextSlide(PowerPoint.SlideShowWindow Wn)
        {
            if (Wn.View.State != PowerPoint.PpSlideShowState.ppSlideShowRunning)
            {
                OnNextSlideTextChanged(string.Empty);
                return;
            }
            var slide      = Wn.View.Slide;
            var slideIndex = slide.SlideIndex;
            var slides     = Wn.Presentation.Slides;

            if (slides.Count == slideIndex)
            {
                OnNextSlideTextChanged(string.Empty);
                return;
            }

            var nextSlide  = slides[slideIndex + 1];
            var textFrames = nextSlide.Shapes.Cast <PowerPoint.Shape>()
                             .Where(s => s.HasTextFrame == Office.MsoTriState.msoTrue)
                             .OrderBy(s => s.Top)
                             .Select(s => s.TextFrame)
                             .Where(t => t.HasText == Office.MsoTriState.msoTrue)
                             .ToList();

            var nextText = string.Join(" ", textFrames.Select(f => f.TextRange.Text.Replace('\n', ' ').Replace('\r', ' ')));

            if (nextText.Length > MaxNextTextLength)
            {
                nextText = nextText.Substring(0, MaxNextTextLength);
            }

            OnNextSlideTextChanged(nextText);
        }
Exemplo n.º 8
0
 private void Application_SlideShowBegin(PowerPoint.SlideShowWindow Wn)
 {
     //Not nessecary
     int    totalslides  = Application.ActivePresentation.Slides.Count;
     int    currentslide = Application.SlideShowWindows[1].View.Slide.SlideIndex;
     string totalslide   = Convert.ToString(totalslides);
 }
Exemplo n.º 9
0
        private void app_SlideShowNextSlide(PP.SlideShowWindow Wn)
        {
            if (SlideIndexChanged == null)
            {
                return;
            }

            //logic to handle slideshow using timings reaching end, go to first slide of next slideshow
            if (Wn.View.State == PP.PpSlideShowState.ppSlideShowDone)
            {
                Slide slide = Slides.FirstOrDefault(s => s.PSlide == Wn.Presentation.Slides[Wn.Presentation.Slides.Count]);
                if (slide != null)
                {
                    app.SlideShowNextSlide -= new PP.EApplication_SlideShowNextSlideEventHandler(app_SlideShowNextSlide);
                    //to change slideshow state from ppSlideShowDone so this method does not continuously run
                    Wn.View.Last();
                    //if first slide of next slideshow has timings, go to slide in order to reset timings to allow it to advance (view reset timings method seemed to have no effect)
                    if (Slides[slide.SlideIndex].PSlide != null)
                    {
                        GoTo(Slides[slide.SlideIndex]);
                    }
                    app.SlideShowNextSlide += new PP.EApplication_SlideShowNextSlideEventHandler(app_SlideShowNextSlide);
                    Application.Current.Dispatcher.Invoke(new Action(() => { SlideIndexChanged(this, new SlideShowEventArgs(-1, slide.SlideIndex + 1)); }));
                }
            }
            else
            {
                Slide slide = Slides.FirstOrDefault(s => s.PSlide == Wn.View.Slide);
                if (slide != null)
                {
                    Application.Current.Dispatcher.Invoke(new Action(() => { SlideIndexChanged(this, new SlideShowEventArgs(-1, slide.SlideIndex)); }));
                }
            }
        }
Exemplo n.º 10
0
 private void Application_SlideShowNextSlide(PowerPoint.SlideShowWindow Wn)
 {
     if (started)
     {
         client.SetCurrentSlideNumber(Wn.Presentation.SlideShowWindow.View.CurrentShowPosition);
     }
 }
Exemplo n.º 11
0
        public int loadFile(String filename)
        {
            //Create app and open file
            app = new PPT.Application();
            pres = app.Presentations.Open(filename, Core.MsoTriState.msoFalse,
                Core.MsoTriState.msoFalse, Core.MsoTriState.msoFalse);

            if (pres == null)
            {
                sss = null;
                ssw = null;
                ssv = null;

                loaded = false;
                visible = false;
                return -1;
            }

            app.Visible = Core.MsoTriState.msoFalse;

            sss = pres.SlideShowSettings;
            sss.ShowType = PPT.PpSlideShowType.ppShowTypeKiosk;
            ssw = sss.Run();
            ssv = ssw.View;

            loaded = true;
            visible = true;
            return pres.Slides.Count;
        }
Exemplo n.º 12
0
        private void Application_SlideShowBegin(PowerPoint.SlideShowWindow Wn)
        {
            pointerForm.SlideWindowRectangle = new System.Drawing.Rectangle(
                (int)Wn.Left, (int)Wn.Top, (int)Wn.Width, (int)Wn.Height
                );
            //pointerForm.Show();

            UpdatePointer();
        }
Exemplo n.º 13
0
 private void StopPresentationEvent(PowerPoint.Presentation Wn)
 {
     Console.WriteLine("Presentation end.");
     _slideWindow = null;
     if (_leapCtrl != null && _leap != null)
     {
         _leapCtrl.RemoveListener(_leap);
     }
 }
Exemplo n.º 14
0
        private void Powerpoint_SlideShowBegin(pp.SlideShowWindow Wn)
        {
            logger.Debug("New slide show started.");

            slideScreenshots.Clear();
            currentScreenIndex = Wn.View.Slide.SlideIndex;

            screenshotTimer.Enabled = true;
        }
Exemplo n.º 15
0
        private void ShowActivePresentation(PowerPoint.SlideShowWindow wn)
        {
            started = true;

            var ribbon = Globals.Ribbons.GetRibbon <MyRibbon>();


            client = new PromptrClient();
            client.StartCountdown(ribbon.TotalDuration, ribbon.SlideDurations);
        }
Exemplo n.º 16
0
        void Application_SlideShowBeginEventHandler(PowerPoint.SlideShowWindow Wn)
        {
            isSlideShow = true;
            int i = Application.ActivePresentation.SlideShowWindow.View.Slide.SlideIndex;

            if (Ribbon1.pwr_btn)
            {
                Start_Record("Slide-" + i);
            }
            //System.Windows.Forms.MessageBox.Show(isSlideShow.ToString());
        }
Exemplo n.º 17
0
 private static void ApplicationOnSlideShowOnNext(PowerPoint.SlideShowWindow wn)
 {
     try
     {
         WakaTime.HandleActivity(wn.Presentation.FullName, false, string.Empty);
     }
     catch (Exception ex)
     {
         WakaTime.Logger.Error("ApplicationOnSlideShowOnNext", ex);
     }
 }
Exemplo n.º 18
0
        /// <summary>
        /// Start of the slide show
        /// </summary>
        /// <param name="Wn"></param>
        void Application_SlideShowBegin(Microsoft.Office.Interop.PowerPoint.SlideShowWindow Wn)
        {
            isSlideShowMode = true;

            //Start the slideshow timer
            if (presentationTimerEnable.Checked)
            {
                timer.Enabled  = true;
                timer.Interval = int.Parse(timerInterval.Text) * 1000;
            }
        }
Exemplo n.º 19
0
 public void startPlay()
 {
     if (isPlaying)
         return;
     else
     {
         PowerPoint.Presentation presentation = Globals.ThisAddIn.Application.ActivePresentation;
         presentation.SlideShowSettings.Run();
         show = presentation.SlideShowWindow;
         isPlaying = true;
     }
 }
Exemplo n.º 20
0
 private void Application_SlideShowBegin(PowerPoint.SlideShowWindow Wn)
 {
     if (!Enable)
     {
         return;
     }
     _timerForm           = new TimerForm();
     _timerForm.GotFocus += (_, __) => Wn.Activate();
     _timerForm.TopMost   = true;
     _timerForm.Show();
     _timerForm.StartTimer();
 }
Exemplo n.º 21
0
        void Application_SlideShowNextSlideEventHandler(PowerPoint.SlideShowWindow Wn)
        {
            int i = Application.ActivePresentation.SlideShowWindow.View.Slide.SlideIndex;

            if (isSlideShow && lastSlide != -1 && Ribbon1.pwr_btn)
            {
                End_Record("Slide-" + lastSlide);

                Start_Record("Slide-" + i);
            }
            lastSlide = i;
        }
Exemplo n.º 22
0
        void SlideShowStart(PowerPoint.SlideShowWindow window)
        {
            _gestureMap.HandSwipeDetected += HandleHandSwipe;
            _gestureMap.ScreenTapDetected += HandleScreenTap;
            _gestureMap.ZoomInDetected    += HandleZoomIn;
            _gestureMap.ZoomOutDetected   += HandleZoomOut;

            Application.ActivePresentation.SlideShowWindow.View.PointerType =
                PowerPoint.PpSlideShowPointerType.ppSlideShowPointerAlwaysHidden;

            _mThreadRunning = true;
            _mouseThread.Start();
        }
 /// <summary>
 /// Slide show begin event
 /// </summary>
 /// <param name="showWindow">slide show window</param>
 private void Application_SlideShowBegin(PowerPoint.SlideShowWindow showWindow)
 {
     lock (this)
     {
         this.showWindow = showWindow;
         if (this.stopEvent == null)
         {
             this.stopEvent  = new ManualResetEventSlim(false);
             this.playThread = new Thread(AutoPlayStub);
             this.playThread.Start(this);
         }
     }
 }
Exemplo n.º 24
0
        public void ThisAddIn_SlideShowNextSlide(PowerPoint.SlideShowWindow Wn)
        {
            char[]   delimiters = { '&' };
            string[] words      = this.Application.SlideShowWindows[1].View.Slide.Name.Split(delimiters);

            //string hi = quizzlyRibbon.semesterDropDown.SelectedItem.Label;
            if (words.Length > 0 && words[0] == "question") // asks a question
            {
                Debug.WriteLine("im asking a question now" + "section:" + words[2]);

                quizzlyRibbon.askQuestion(words[1], words[2]);
            }
        }
    //End Presentation
    public void EndPresentation(SocketIOEvent socketIOEvent)
    {
        CheckPowerPoint();

        if (pptApplication == null)
        {
            return;
        }

        pptApplication.Activate();
        PPt.SlideShowWindow slideShowWindow = presentation.SlideShowWindow;
        slideShowWindow.View.Exit();
    }
Exemplo n.º 26
0
        private void PptApplication_SlideShowNextSlide(PPt.SlideShowWindow Wn)
        {
            int p = Wn.View.CurrentShowPosition;

            try
            {
                OnPageChanged(p);
            }
            catch (Exception)
            {
                //ignore
            }
        }
Exemplo n.º 27
0
 public void startPlay()
 {
     if (isPlaying)
     {
         return;
     }
     else
     {
         PowerPoint.Presentation presentation = Globals.ThisAddIn.Application.ActivePresentation;
         presentation.SlideShowSettings.Run();
         show      = presentation.SlideShowWindow;
         isPlaying = true;
     }
 }
Exemplo n.º 28
0
        public void end()
        {
            if (loaded)
            {
                pres.Close();
                app.Quit();

                sss = null;
                ssw = null;
                ssv = null;

                loaded = false;
                visible = false;
            }
        }
Exemplo n.º 29
0
        private void Application_SlideShowStarted(PowerPoint.SlideShowWindow window)
        {
            overlayWindow = new Overlay();
            overlayWindow.setSlideShowWindow(window);
            overlayWindow.setSlideShowActive(true);
            RECT rect = new RECT();

            GetWindowRect(new IntPtr(window.HWND), ref rect);
            overlayWindow.Left   = rect.Left; // EDIT: do not use slideshowWindow.Left, etc.
            overlayWindow.Top    = rect.Top;
            overlayWindow.Width  = rect.Right;
            overlayWindow.Height = rect.Bottom;
            overlayWindow.Show();
            //Wn.View.PointerType = PowerPoint.PpSlideShowPointerType.ppSlideShowPointerPen;
            //Wn.View.DrawLine(0, 0, 20, 20);
        }
Exemplo n.º 30
0
        private void StartPresentationEvent(PowerPoint.SlideShowWindow Wn)
        {
            Console.Write("Presentation start.");
            _slideWindow = Wn;

            if (Config._value.IsEnabled)
            {
                if (_leapCtrl.IsConnected)
                {
                    _leapCtrl.AddListener(_leap);
                }
            }
            else
            {
                Console.WriteLine("AddIn is disabled so do nothing.");
            }
        }
Exemplo n.º 31
0
        private void ObjName_SlideShowNextSlide(PowerPoint.SlideShowWindow Wn)
        {
            TimeSpan ts      = s.Elapsed;
            TimeSpan LapTime = ts - LastBreakTime;

            LastBreakTime = ts;
            prevSlideTime = LapTime.TotalMilliseconds;

            ++lapCount;
            lapList.Items.Add(ts.ToString() + "," + prevSlideTime.ToString() + "," + prevAllotedTime.ToString());
            nextAllotedTime = (allotedSlideTime + (prevAllotedTime - prevSlideTime));
            nextAllotedTime = (nextAllotedTime / 1000);
            string nextSlideTimeStr = nextAllotedTime.ToString(); //DEBUG CODE to show how much time next slide has

            MessageBox.Show(nextSlideTimeStr + " seconds");
            prevAllotedTime = nextAllotedTime;
        }
Exemplo n.º 32
0
        private void Application_SlideShowNextClick(PowerPoint.SlideShowWindow Wn, PowerPoint.Effect nEffect)
        {
            //throw new NotImplementedException();
            // PowerPointスライドの「ノート」部分を取得する。
            string note  = Wn.View.Slide.NotesPage.Shapes.Placeholders[2].TextFrame.TextRange.Text;
            string noteT = note.Trim();

            if (noteT != "")
            {
                oscSender.Connect();
                Debug.WriteLine("つなげた");
                oscSender.Send(new OscMessage("/scene", noteT));
                //oscSender.Send(new OscMessage("/change", int.Parse(noteT)));
                Debug.WriteLine(noteT + ":");
                this.oscSender.Close();
                Debug.WriteLine("とじた");
            }
        }
Exemplo n.º 33
0
        private void Application_SlideShowNextSlide(PowerPoint.SlideShowWindow Wn)
        {
            // I dont think  this is nessecary
            int    totalslides = Application.ActivePresentation.Slides.Count;
            int    m           = Application.SlideShowWindows[1].View.Slide.SlideIndex;
            string totalslide  = Convert.ToString(totalslides);


            var presentation = Globals.ThisAddIn.Application;
            //get the current slide that's on the screen
            int currentslide = Application.SlideShowWindows[1].View.Slide.SlideIndex;
            //get the notes for that current slide
            string Notes = presentation.ActivePresentation.Slides[currentslide].NotesPage.Shapes[2].TextFrame.TextRange.Text;
            //Get the last line in the slide which will be the date time the user wants the slide to disappear
            string tail = Notes.Substring(Notes.LastIndexOf('\r') + 1);

            // sets the Provide for parsing the Date / Time
            System.Globalization.CultureInfo provider = new System.Globalization.CultureInfo("en-US");
            // Sets the input format for the expected Date/Time.
            string inputFormat = "MM/dd/yyyy HH:mm tt";

            // If the Date / Time read in the notes is nothing
            if (tail == "")
            {
                //do nothing
            }
            else
            {
                //else  convert the string into a Date/Time value
                DateTime resultDate = DateTime.ParseExact(tail, inputFormat, provider.DateTimeFormat);
                //if the read Date/Time is before the Date/Time right now
                if (resultDate <= DateTime.Now)
                {
                    //Delete the slide
                    presentation.ActivePresentation.Slides[currentslide].Delete();
                }
            }
            //not nessecary
            string current = Convert.ToString(currentslide);
        }
Exemplo n.º 34
0
 // スライドショーの終了
 void Application_SlideShowEnd(Microsoft.Office.Interop.PowerPoint.Presentation Pres)
 {
     SlideShow = null;
 }
Exemplo n.º 35
0
 // スライドショーの開始
 void Application_SlideShowBegin(Microsoft.Office.Interop.PowerPoint.SlideShowWindow Wn)
 {
     SlideShow = Wn;
 }