public static void EmbedSelectedSlideNotes() { List <PowerPointSlide> slides = PowerPointCurrentPresentationInfo.SelectedSlides.ToList(); if (AudioSettingService.selectedVoiceType == AudioGenerator.VoiceType.AzureVoice && AzureAccount.GetInstance().IsEmpty()) { MessageBox.Show("Invalid user account. Please log in again."); throw new Exception("Invalid user account."); } int numberOfSlides = slides.Count; ProcessingStatusForm progressBarForm = new ProcessingStatusForm(numberOfSlides, BackgroundWorkerType.AudioGenerationService); progressBarForm.Show(); }
public static List <string[]> EmbedAllSlideNotes() { var progressBarForm = new ProcessingStatusForm(); progressBarForm.Show(); var audioList = new List <string[]>(); var slides = PowerPointPresentation.Current.Slides; int numberOfSlides = slides.Count; for (int currentSlideIndex = 0; currentSlideIndex < numberOfSlides; currentSlideIndex++) { var percentage = (int)Math.Round(((double)currentSlideIndex + 1) / numberOfSlides * 100); progressBarForm.UpdateProgress(percentage); progressBarForm.UpdateSlideNumber(currentSlideIndex, numberOfSlides); var slide = slides[currentSlideIndex]; audioList.Add(EmbedSlideNotes(slide)); } progressBarForm.Close(); return(audioList); }