private static string GetNotesFirstLine(SlideShowWindow slideShowWindow) { var slide = slideShowWindow.View.Slide; var result = slideShowWindow.View.Slide.HasNotesPage; if (result == MsoTriState.msoTrue) { var notes = slide.NotesPage; var shapes = notes.Shapes; foreach (Shape shape in shapes) { if (shape.Type == MsoShapeType.msoPlaceholder && shape.PlaceholderFormat.Type == PpPlaceholderType.ppPlaceholderBody) { if (shape.HasTextFrame == MsoTriState.msoTrue) { TextFrame textFrame = shape.TextFrame; if (textFrame.HasText == MsoTriState.msoTrue) { TextRange textRange = textFrame.TextRange; string allText = textRange.Text; string[] lines = allText.Split('\r'); string notesFirstLine = lines.FirstOrDefault(); return notesFirstLine; } } } } } return null; }
public Presenter(Application app, SlideShowWindow win) { app_ = app; win_ = win; try { provider_ = new Nui.Provider(); } catch (InvalidOperationException) { provider_ = null; if (MessageBox.Show( "Kinect is not detected. Check the connection and device.\nWould you like to disable Kinect for the presentation?", "Kynapsee", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.Yes) { win_.Presentation.SetKinectEnable(false); return; } win_.View.Exit(); return; } gestures_ = win.Presentation.GetNuiModel(); provider_.GestureDone += GestureDone; app.SlideShowNextSlide += SlideShowNextSlide; LoadSlideGestures(); }
void Application_SlideShowBegin(SlideShowWindow Wn) { if (!paneModel_.Presentation.GetKinectEnable()) return; presenter_ = new Presenter(Application, Wn); /* if (!pres_.Tags.Get("KY_KinectEnabled", false)) return; ssw_ = Wn; LoadKinect(); if (kinect_ == null) { if (MessageBox.Show("Kinect is not detected. Check the connection and device.\nWould you like to disable Kinect for the presentation?", "Kynapsee", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.Yes) { pres_.Tags.Add("KY_KinectEnabled", false); } else { Wn.View.Exit(); } } else { } */ }
private void OnNextSlide(SlideShowWindow window) { if (_form != null && NotesChanged != null) { NotesChanged(this, new NotesChangedEventArgs(GetNotes(window.View.Slide))); } }
private void Application_SlideShowBegin(SlideShowWindow Wn) { if (_overlay == null) { _overlay = new PresentationOverlay(); _overlay.DataContext = new PresentationOverlayViewModel {SlideShowWindow = Wn}; _overlay.Show(); } }
public void Start(SlideShowWindow slideShowWindow) { _slideShowWindow = slideShowWindow; _bodyFrameReader = _kinectSensor.BodyFrameSource.OpenReader(); _bodyFrameReader.FrameArrived += OnBodyFrameArrived; _bodies.Clear(); _scans.Clear(); }
//跳转,包括上一页下一页 void Application_SlideShowNextSlide(SlideShowWindow Wn) { if (!Controller.isPlaying) { Controller.isPlaying = true; Controller.show = Wn; } if (isClientOnline) server.jumpTo(Wn.View.Slide.SlideIndex); }
private void Application_SlideShowBegin(SlideShowWindow Wn) { if (Properties.Settings.Default.NDIStatic) { _window = Wn; _ndiSender = new Thread(SendNdi) { Priority = ThreadPriority.Normal, Name = "StaticNdiSenderThread", IsBackground = true }; _ndiSender.Start(); } }
//##################################################################################################### EVENEMENT DU SLIDESHOW /// <summary> /// Méthode déclenchée lorsque le slideshow/diaporama passe à la slide suivante /// </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_SlideShowNextSlide(SlideShowWindow Wn) { if (this.pointer != null) { this.deleteCurrentPointer(); } if (this.ribbon.chkPointer.Checked) { this.createPointer(Wn.View.Slide); } }
/// <summary> /// Called when a slide is loaded, in a slide show mode. Kills existing countdown, and start thoses on the /// loaded slide /// </summary> /// <param name="SlideShowWindow">The current slide show window</param> void OnSlideShowNextSlide(SlideShowWindow SlideShowWindow) { // If timers are running, kill them before starting them on the new slide disposeCountDowns(); // If a timer is on the slide, init it! var currentSlide = SlideShowWindow.View.Slide; runningCountDowns = getCountDowns(currentSlide) .Select(shape => new CountDown(shape)) .ToList(); }
public void Application_SlideShowNextSlide(SlideShowWindow Wn) { presence.Details = Wn.Presentation.Name; presence.State = Shared.Shared.getString("presenting"); presence.Assets.LargeImageKey = "present"; presence.Party = new Party() { ID = Secrets.CreateFriendlySecret(new Random()), Max = Wn.Presentation.Slides.Count, Size = Wn.View.CurrentShowPosition }; client.SetPresence(presence); }
private void ApplicationOnSlideShowEnd(Presentation presentation) { /* * It's possible that the last active slide show was not the slide show that ended. * The first clause is true if the active slide show ended manually. * The second clause is true if the active slide show ended by clicking through to the end. */ if (!_application.SlideShowWindows.Cast <SlideShowWindow>().Contains(SlideShowWindow) || SlideShowWindow.View.State == PpSlideShowState.ppSlideShowDone) { SlideShowWindow = null; } }
//Slide moving in slide show void ThisAddIn_SlideShowNextSlide(SlideShowWindow Wn) { if (!this.expositionId.Equals(0)) { //add a text box to each new slide PowerPoint.Shape textBox = Wn.View.Slide.Shapes.AddTextbox( Office.MsoTextOrientation.msoTextOrientationHorizontal, 0, 0, 500, 50); textBox.TextFrame.TextRange.InsertAfter("Join us at: XXX/XXX"); String slideId = Wn.View.Slide.SlideNumber.ToString(); this.updateSlide(slideId); } }
private void App_SlideShowNextSlide(SlideShowWindow Wn) { if (Wn != null) { Console.WriteLine($"Moved to Slide Number {Wn.View.Slide.SlideNumber}"); //Text starts at Index 2 ¯\_(ツ)_/¯ var note = String.Empty; try { note = Wn.View.Slide.NotesPage.Shapes[2].TextFrame.TextRange.Text; } catch { /*no notes*/ } ISceneManager reader = new PowerpointNotesSceneManager(_obsManager); reader.ProcessData(note); } }
//Events public static void app_SlideShowNextSlide(SlideShowWindow Wn) { //System.Console.WriteLine(readSlideTimecode(Wn)); //System.Console.WriteLine(readSlideText(Wn)); StreamWriter sw = new StreamWriter(MainWindow.savePath, true); sw.WriteLine(GetTimestamp(DateTime.Now)); // sw.WriteLine(readSlideTimecode(Wn)); sw.WriteLine(readSlideText(Wn)); sw.Close(); addToInitialList(GetTimestamp(DateTime.Now), readSlideText(Wn)); //addToList(readSlideText(Wn), readSlideTimecode(Wn)); //crashing //addTimecodeToSlide(readSlide(Wn), readSlideTimecode(Wn)); }
/// <summary> /// Occures whenever a presentation starts /// </summary> /// <param name="window"></param> private void Event_BeginSlideShow(SlideShowWindow window) { //count = window.Presentation.Slides.Count; if (started == false) { started = true; Thread thread = new Thread(() => { Debug.WriteLine("Event: Begin Slide Show has occured"); RestRequest request = new RestRequest("Broadcast/NetworkEvent_SlideShowStart"); client.Post(request); }); thread.Start(); } }
/* * Creates a new evaluation diagram and replaces the existing image. */ private void createNewDiagram(Evaluation evaluation, SlideShowWindow ssw, Dictionary <String, int> newAnswers) { // delete answer diagram of current slide ssw.View.Slide.Shapes[ssw.View.Slide.Shapes.Count].Delete(); // create a new bar chart Charting.Chart barChart = createBarChart(newAnswers); // replace old diagram image with new one barChart.SaveImage(evaluation.pathToDiagramImage, Charting.ChartImageFormat.Png); // add diagramm image to current slide ssw.View.Slide.Shapes.AddPicture2(evaluation.pathToDiagramImage, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoTrue, DiagramImageX, DiagramImageY); }
public StageViewForm(SlideShowWindow wn) { SlideShowWindow = wn; InitializeComponent(); refreshTimer = new Timer(); refreshTimer.Interval = TimerInterval; refreshTimer.Tick += OnDisplayTick; refreshTimer.Start(); deactivateTimer = new Timer(); deactivateTimer.Interval = DeactivateDelay; deactivateTimer.Tick += OnDeactivateTimer; LayoutObjects(); }
public static void TweetSlideChange_SlideShowNextSlide(Application powerpointApplication, SlideShowWindow slideShowWindow) { try { string subject = ConfigManager.CurrentUserSpecific.PresentationSubject; string notesFirstLine = GetNotesFirstLine(slideShowWindow); if (String.IsNullOrEmpty(notesFirstLine)) return; string tweet = String.Format("{0} {1}", subject, notesFirstLine).Trim(); TwitterFeedSupport.Tweet(tweet); } catch { } }
void IClickerTarget.SendPrevious() { try { SlideShowWindow w = GetActiveSlideShowWindow(); if (w != null) { w.View.Previous(); } } catch (Exception) { } }
public bool startSlideShow() { if (this.powerpoint == null) { return(false); } if (this.powerpoint.Presentations.Count == 0) { return(false); } stopSlideShow(); if (slides == null) { presentations = powerpoint.Presentations; presentation = presentations._Index(1); if (presentation != null) { slides = presentation.Slides; } } if (slides != null) { int all = slides.Count; int[] SlideIdx = new int[all]; for (int i = 0; i < all; i++) { SlideIdx[i] = i + 1; } slideRange = slides.Range(SlideIdx); slideShowTransition = slideRange.SlideShowTransition; slideShowTransition.AdvanceOnTime = Microsoft.Office.Core.MsoTriState.msoFalse; slideShowTransition.EntryEffect = Microsoft.Office.Interop.PowerPoint.PpEntryEffect.ppEffectBoxOut; //Prevent Office Assistant from displaying alert messages: //dumps if NotFiniteNumberException installed bAssistantOn = powerpoint.Assistant.On; // powerpoint.Assistant.On = false; //Run the Slide show slideShowSettings = presentation.SlideShowSettings; slideShowSettings.StartingSlide = 1; slideShowSettings.EndingSlide = all; slideShowWindow = slideShowSettings.Run(); slideShowWindows = powerpoint.SlideShowWindows; } return(true); }
void IClickerTarget.SendNext() { try { SlideShowWindow w = GetActiveSlideShowWindow(); // Prevent click-through of "End of slide show, click to exit." placeholder screen if (w != null && w.View.State != PPt.Enums.PpSlideShowState.ppSlideShowDone) { w.View.Next(); } } catch (Exception) { } }
void Application_SlideShowEnd(PowerPoint.Presentation Pres) { this.slideShow = null; //Si on souhaite que les transitions soient optimisé pour kinect via la checkbox du ruban if (this.ribbon.chkTransition.Checked == true) { //Récupère les transitions for (int i = 1; i <= this.Application.ActivePresentation.Slides.Count; i++) { //Récupération de la slide this.Application.ActivePresentation.Slides[i].SlideShowTransition.EntryEffect = transitionsBackup[i].EntryEffect; this.Application.ActivePresentation.Slides[i].SlideShowTransition.Duration = transitionsBackup[i].Duration; } } }
/// <summary> /// Fires when a slideshow begins /// </summary> static void ppt_SlideShowBegin(SlideShowWindow win) { if (ActiveSlideShow != null) { Log.Warning("Ignoring new slide show as another is already active"); return; } Log.Success("Beginning slide show"); Log.Success("\t" + formatPresentationNameForConsole(win.Presentation)); // Start the timer & store presentation references ActiveSlideShow = win; ActiveSlideShowCache = new Cache(win.Presentation); watch.Reset(); watch.Start(); }
/// <summary> /// Called each time a slide is loaded. Effect will tell if an effect is eligible on the next click, /// if so, mark the corresponding timer as "elligible" for start on the next click /// </summary> /// <param name="SlideShowWindow"></param> /// <param name="Effect"></param> void OnSlideShowNextClick(SlideShowWindow SlideShowWindow, Effect Effect) { // Detect which CountDown will start at next click if (Effect != null) { if (Effect.Shape.Tags[Constants.TimerLauncher] == Constants.TimerLauncherValue) { runningCountDowns .FirstOrDefault <CountDown>(cd => cd.UnderlyingLauncherShapeId == Effect.Shape.Id)?.Init(); } } else { runningCountDowns.FirstOrDefault <CountDown>(cd => cd.Status == CountDownStatusEnum.Ready) ?.Start(); } }
async static void App_SlideShowNextSlide(SlideShowWindow Wn) { if (Wn != null) { Console.WriteLine($"Moved to Slide Number {Wn.View.Slide.SlideNumber}"); //Text starts at Index 2 ¯\_(ツ)_/¯ var note = String.Empty; try { note = Wn.View.Slide.NotesPage.Shapes[2].TextFrame.TextRange.Text; } catch { /*no notes*/ } if (note.StartsWith("OBS:")) { note = new StringReader(note).ReadLine().Substring(4); Console.WriteLine($" Switching to OBS Scene named \"{note}\""); OBS.ChangeScene(note); } } }
public void ExitPresentation() { if (ActiveSlideShow == null) { throw new InvalidOperationException(); } try { Debug.Print("Exit presentation called."); ActiveSlideShow.View.Exit(); } catch (COMException) { // Handles COMException with error code 0x80004005 // object does not exist ActiveSlideShow = null; } }
public static void OnNextSlide(SlideShowWindow Wn) { int currentSlide = Wn.View.CurrentShowPosition; if (Connection.CurrentRole == Role.Notconnected) { return; } else if (Connection.CurrentRole == Role.Host) { ServerController.OnPresentationNextSlide(currentSlide); } else { Connection.clientConnection.ClPresentationNextSlide(currentSlide); } Connection.CurrentPresentation.CurrentSlide = currentSlide; }
/// <summary> /// Get the active PowerPoint slide show window object /// /// If there are multiple active slide shows, only the first slide show window object will be returned /// </summary> /// <returns>SlideShowWindow, or null if none</returns> private static SlideShowWindow GetActiveSlideShowWindow() { try { PPt.Application pptApplication = PPt.Application.GetActiveInstance(); if (pptApplication == null) { return(null); } SlideShowWindow w = (SlideShowWindow)pptApplication.SlideShowWindows.FirstOrDefault(); return(w); } catch (Exception) { return(null); } }
public InShowRecordingControl(RecorderTaskPane recorder) : this() { _slideShowWindow = this.GetCurrentPresentation().Presentation.SlideShowWindow; _startingSlide = this.GetCurrentPresentation().Presentation.SlideShowSettings.StartingSlide; _recorder = recorder; // get slide show window var slideShowWindow = new IntPtr(_slideShowWindow.HWND); Native.RECT rec; Native.GetWindowRect(new HandleRef(new object(), slideShowWindow), out rec); Left = rec.Right / GraphicsUtil.GetDpiScale() - Width; Top = rec.Bottom / GraphicsUtil.GetDpiScale() - Height; _status = ButtonStatus.Idle; // disable undo button by default, enable only when there has something to undo undoButton.IsEnabled = false; }
private void Simple_SlideShowNextSlide(SlideShowWindow Wn) { Slide slide = Wn.View.Slide; if (ShapesUitls.IsExistedOfShape(slide, "questionType") && slide.Shapes["questionType"].TextFrame.TextRange.Text.Equals("4")) { MF.CommandButton sumbitButton = (MF.CommandButton)slide.Shapes["sumbitButton"].OLEFormat.Object;//发布按钮 sumbitButton.Click -= sumbitSimpleQuestion_Click; sumbitButton.Click += sumbitSimpleQuestion_Click; sumbitButton.TakeFocusOnClick = false; sumbitButton.Enabled = true; buttonClickCount = 1; MF.CommandButton answerButton = (MF.CommandButton)slide.Shapes["answerButton"].OLEFormat.Object;//答案按钮 answerButton.Click -= answerSimple_Click; answerButton.Click += answerSimple_Click; answerButton.TakeFocusOnClick = false; answerButton.Enabled = true; } }
/// <summary> /// Occurs whenever a transition between slides is made either forwards or backwards. /// </summary> /// <param name="window"></param> private void Event_NextSlide(SlideShowWindow window) { //count = window.Presentation.Slides.Count; //int currentIndex = window.View.Slide.SlideIndex; //int prevIndex = currentIndex - 1; //int nextIndex = currentIndex + 1; //this.PreviousSlide = (currentIndex == 1) ? null : window.Presentation.Slides[prevIndex]; //this.CurrentSlide = window.Presentation.Slides[currentIndex]; //this.NextSlide = (currentIndex == count) ? null : window.Presentation.Slides[nextIndex]; if (next_slide_mutex == false) { next_slide_mutex = true; Thread thread = new Thread(() => { Debug.WriteLine("Event: Next Slide Show has occured"); RestRequest request = new RestRequest("Broadcast/NetworkEvent_SlideChange"); client.Post(request); next_slide_mutex = false; }); thread.Start(); } }
private void OnSlideChange(SlideShowWindow slideShowWindow) { // TODO check if timer is running and cancel next or previous event! // start arsnova click question when getting on results slide var isSlideStartArsnovaClickQuestion = SlideTracker.IsPresentationOnStartArsnovaSlide(); if (isSlideStartArsnovaClickQuestion.Item1) { this.ribbonHelper.StartQuiz(isSlideStartArsnovaClickQuestion.Item2); return; } var isSlideArsnovaVotingResultsSlide = SlideTracker.IsPresentationOnResultsArsnovaVotingSlide(); if (isSlideArsnovaVotingResultsSlide.Item1) { //GetResults this.ribbonHelper.GetAndDisplayArsnovaVotingResults(isSlideArsnovaVotingResultsSlide.Item2); } }
async static void App_SlideShowNextSlide(SlideShowWindow Wn) { if (Wn != null) { Console.WriteLine($"Moved to Slide Number {Wn.View.Slide.SlideNumber}"); //Text starts at Index 2 ¯\_(ツ)_/¯ var note = String.Empty; try { note = Wn.View.Slide.NotesPage.Shapes[2].TextFrame.TextRange.Text; } catch { /*no notes*/ } var notereader = new StringReader(note); string line; while ((line = notereader.ReadLine()) != null) { if (line.StartsWith("OBS:")) { line = line.Substring(4).Trim(); await HandleCommand(line); } } } }
private void Vote_SlideShowNextSlide(SlideShowWindow Wn) { Slide slide = Wn.View.Slide; if (ShapesUitls.IsExistedOfShape(slide, "questionType") && slide.Shapes["questionType"].TextFrame.TextRange.Text.Equals("5")) { MF.CommandButton sumbitButton = (MF.CommandButton)slide.Shapes["sumbitButton"].OLEFormat.Object; sumbitButton.Click -= sumbitVote_Click; sumbitButton.Click += sumbitVote_Click; sumbitButton.TakeFocusOnClick = false; sumbitButton.Enabled = true; buttonClickCount = 1; //MF.CommandButton answerButton = (MF.CommandButton)slide.Shapes["answerButton"].OLEFormat.Object; //answerButton.Click -= answerSingleChocie_Click; //answerButton.Click += answerSingleChocie_Click; //answerButton.TakeFocusOnClick = false; //answerButton.Enabled = true; ShapesUitls.ChoiceOptionNoChecked(slide); } }
public Controller(SlideShowWindow window) { view = window.View; this.window = window; window.Application.SlideShowOnPrevious += (s) => SlideShowChanged?.Invoke(this, s); window.Application.SlideShowNextSlide += (s) => SlideShowChanged?.Invoke(this, s); var pageWidth = window.Application.ActivePresentation.PageSetup.SlideWidth; var pageHeight = window.Application.ActivePresentation.PageSetup.SlideHeight; var screenSize = Screen.PrimaryScreen.Bounds; double rateWidth = screenSize.Width / pageWidth; double rateHeight = screenSize.Height / pageHeight; if (rateWidth < rateHeight) { SlideShowMargin = new Size(0, (int)(screenSize.Height - pageHeight * rateWidth) / 2); } else { SlideShowMargin = new Size((int)(screenSize.Width - pageWidth * rateHeight) / 2, 0); } }
private void Powerpoint_SlideShowNextSlide(SlideShowWindow Wn) { // extract title string title = ""; //if (Wn.View.Slide.Shapes.HasTitle == Microsoft.Office.Core.MsoTriState.msoTrue) //{ // if (Wn.View.Slide.Shapes.Title.HasTextFrame == Microsoft.Office.Core.MsoTriState.msoTrue) // { // if (Wn.View.Slide.Shapes.Title.TextFrame.HasText == Microsoft.Office.Core.MsoTriState.msoTrue) // { // title = Wn.View.Slide.Shapes.Title.TextFrame.TextRange.Text; // } // } //} //string keywords = ""; //foreach (Shape shape in Wn.View.Slide.Shapes) //{ // if (shape.HasTextFrame == Microsoft.Office.Core.MsoTriState.msoTrue) // { // if (shape.TextFrame.HasText == Microsoft.Office.Core.MsoTriState.msoTrue) // { // keywords += " " + shape.TextFrame.TextRange.Text; // } // } //} //keywords = keywords.Replace("\r\n", ""); //keywords = keywords.Trim(); SlideChanged(this, new SlideChangedEventArgs() { Title = title }); }
/* * What happens when next slide appears. */ public void slideShowNextSlide(SlideShowWindow ssw) { if (startFromCurrentSlide) { startFromCurrentSlide = false; ssw.View.GotoSlide(slideIndexToStart); } onSlideTime = DateTime.Now; // cancel update thread when entering a new slide updateThread.Dispose(); int currentSlideId = ssw.View.Slide.SlideID; int currentSlideIndex = ssw.View.Slide.SlideIndex; // check if we are currently on a evaluation slide -> the forloop is a workaround foreach (var evaluationSlide in EvaluationSlides) { if (evaluationSlide.Key.SlideID == currentSlideId) { var evaluation = EvaluationSlides[evaluationSlide.Key]; startUpdateThread(evaluation, ssw); //updateSlide(null, null, evaluation, ssw); } } if (SlideIdPresentation != currentSlideId && MyRibbon.pptNavigator.getCustomSlideById(currentSlideId) != null) { //pushAndEvaluateThread(null, null, currentSlideId); startObserveTimer(currentSlideId); } // update slideId and slideIndex of current presentation SlideIndexPresentation = currentSlideIndex; SlideIdPresentation = currentSlideId; }
public InShowControl(RecorderTaskPane recorder) { InitializeComponent(); // set the background transparency BackColor = Color.Magenta; TransparencyKey = Color.Magenta; _slideShowWindow = PowerPointPresentation.Current.Presentation.SlideShowWindow; _startingSlide = PowerPointPresentation.Current.Presentation.SlideShowSettings.StartingSlide; _recorder = recorder; // get slide show window var slideShowWindow = new IntPtr(_slideShowWindow.HWND); Native.RECT rec; Native.GetWindowRect(new HandleRef(new object(), slideShowWindow), out rec); Location = new Point(rec.Right - Width, rec.Bottom - Height - 65); _status = ButtonStatus.Idle; // disable undo button by default, enable only when there has something to undo undoButton.Enabled = false; }
private void OnSlideShowBegin(SlideShowWindow Wn) { try { foreach (ISlideShowCommandDetector detector in detectors) { detector.Initialize(); } foreach (ISlideShowCommandDetector detector in detectors) { detector.SlideShowCommandDetected += OnSlideShowCommandDetected; detector.Start(); } } catch { ErrorHandler.ShowSlideShowModeKinectNotFoundDialog(); } slideShowView = Wn.View; slideId = slideShowView.Slide.SlideID; step = 0; }
public InShowControl(RecorderTaskPane recorder) { InitializeComponent(); // set the background transparency BackColor = Color.Magenta; TransparencyKey = Color.Magenta; _slideShowWindow = PowerPointPresentation.Current.Presentation.SlideShowWindow; _startingSlide = PowerPointPresentation.Current.Presentation.SlideShowSettings.StartingSlide; _recorder = recorder; // get slide show window var slideShowWindow = new IntPtr(_slideShowWindow.HWND); Native.RECT rec; Native.GetWindowRect(new HandleRef(new object(), slideShowWindow), out rec); Location = new Point(rec.Right - Width, rec.Bottom - Height- 65); _status = ButtonStatus.Idle; // disable undo button by default, enable only when there has something to undo undoButton.Enabled = false; }
public bool startSlideShow() { if (this.powerpoint == null) return false; if (this.powerpoint.Presentations.Count == 0) return false; stopSlideShow(); if (slides == null) { presentations = powerpoint.Presentations; presentation = presentations._Index(1); if (presentation != null) { slides = presentation.Slides; } } if (slides != null) { int all = slides.Count; int[] SlideIdx = new int[all]; for (int i = 0; i < all; i++) SlideIdx[i] = i + 1; slideRange = slides.Range(SlideIdx); slideShowTransition = slideRange.SlideShowTransition; slideShowTransition.AdvanceOnTime = Microsoft.Office.Core.MsoTriState.msoFalse; slideShowTransition.EntryEffect = Microsoft.Office.Interop.PowerPoint.PpEntryEffect.ppEffectBoxOut; //Prevent Office Assistant from displaying alert messages: //dumps if NotFiniteNumberException installed bAssistantOn = powerpoint.Assistant.On; // powerpoint.Assistant.On = false; //Run the Slide show slideShowSettings = presentation.SlideShowSettings; slideShowSettings.StartingSlide = 1; slideShowSettings.EndingSlide = all; slideShowWindow = slideShowSettings.Run(); slideShowWindows = powerpoint.SlideShowWindows; } return true; }
public void slideShowStopped(Presentation presentation) { this.slideShowWindow = null; OfficeConsole.The.sendEvent("PowerPoint.SlideShowEndEvent " + presentation.Name); }
// ------------------- Event handlers ----------------------- public void slideShowStarted(SlideShowWindow window) { this.slideShowWindow = window; OfficeConsole.The.sendEvent("PowerPoint.SlideShowBeginEvent " + window.Presentation.Name); }
void slideShowOnPrevious(SlideShowWindow Wn) { ThisAddIn.The.sendStringMessage("PowerPoint.SlideShowOnPreviousEvent " + CurrentSlide); }
private void OnSlideShowBegin(SlideShowWindow window) { _win = window; if(_form != null) { _form.Show(); } }
void slideShowNextSlide(SlideShowWindow Wn) { ThisAddIn.The.sendStringMessage("PowerPoint.SlideShowNextSlideEvent " + CurrentSlide); }
void slideShowOnNext(SlideShowWindow Wn) { OfficeConsole.The.sendEvent("PowerPoint.SlideShowOnNextEvent " + CurrentSlide); }
private void OnSlideShowNextSlide(SlideShowWindow Wn) { slideId = slideShowView.Slide.SlideID; step = 0; }
public static Slide readSlide(SlideShowWindow Wn) { //SlideShowView ssv = oPre.SlideShowWindow.View; SlideShowView ssv = Wn.View; return ssv.Slide; }
public static float readSlideTimecode(SlideShowWindow Wn) { String timeStamp = GetTimestamp(DateTime.Now); float timecode = Wn.View.SlideElapsedTime; return timecode; }
public static void app_SlideShowBegin(SlideShowWindow Wn) { System.Console.WriteLine("Slide Show begins"); }
private void OnSlideShowEnd(Presentation presentation) { _win = null; if (_form != null) { _form.Hide(); } }
public bool stopSlideShow() { if (this.powerpoint == null) return false; if (this.powerpoint.Presentations.Count == 0) return false; if (slideShowWindow != null) { slideShowWindow.View.Exit(); slideShowWindow = null; return true; } else return false; }
void slideShowNextClick(SlideShowWindow Wn, Effect nEffect) { OfficeConsole.The.sendEvent("PowerPoint.SlideShowNextClickEvent " + CurrentSlide); }
void m_PowerPointApplication_SlideShowBegin (SlideShowWindow Wn) { try { Wn.Left = (int) ((double) m_HostCVM.XPosition * WMB.Basics.XDPIFactor); Wn.Top = (int) ((double) m_HostCVM.YPosition * WMB.Basics.YDPIFactor); Wn.Width = (int) ((double) m_HostCVM.VideoWidth * WMB.Basics.XDPIFactor); Wn.Height = (int) ((double) m_HostCVM.VideoHeight * WMB.Basics.YDPIFactor); } catch (Exception Excp) { WMB.Basics.ReportErrorToEventViewer (m_MessageDescriptionID + ".m_PowerPointApplication_SlideShowBegin", "Es trat folgender Fehler auf:\r\n" + Excp.ToString()); } }
void slideShowOnPrevious(SlideShowWindow Wn) { OfficeConsole.The.sendEvent("PowerPoint.SlideShowOnPreviousEvent " + CurrentSlide); }
void Application_SlideShowNextSlide(SlideShowWindow Wn) { /* if (kinect_ == null) return; if (trackedShapes_.Count > 0) kinect_.Nui.SkeletonFrameReady -= Nui_SkeletonFrameReady; bool hasTrackedShape = false; trackedShapes_.Clear(); foreach (Shape shape in Wn.View.Slide.Shapes) { if (shape.Tags["KY_Joint"] != "") { trackedShapes_[shape.Tags["KY_Joint"] == "LeftHand" ? JointID.HandLeft : JointID.HandRight] = shape; hasTrackedShape = true; } } if (hasTrackedShape) kinect_.Nui.SkeletonFrameReady += Nui_SkeletonFrameReady; */ }
public static String readSlideText(SlideShowWindow Wn) { SlideShowView ssv = Wn.View; Slide currentSlide = ssv.Slide; if (currentSlide.Shapes.Count==0) { System.Console.WriteLine("Error"); return ""; } else { TextRange tr = currentSlide.Shapes[1].TextFrame.TextRange; return italicFilter(tr); } }
public void ShowSlidePresentation() { window = presentation.SlideShowSettings.Run(); }