private void SyncLabItemToAnimationPane(ELearningService service)
        {
            int totalSelfExplanationItemsCount   = service.GetExplanationItemsCount();
            ProcessingStatusForm progressBarForm =
                new ProcessingStatusForm(totalSelfExplanationItemsCount, BackgroundWorkerType.ELearningLabService, service);

            progressBarForm.ShowThematicDialog();
        }
        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.ShowThematicDialog(false);
        }
Esempio n. 3
0
        internal Commander(Form form, UIDocument uidoc)
        {
            if (null == form || null == uidoc)
            {
                throw new IcnException("One or more parameters not set to a reference", 10, "BimServerExchange Commander");
            }

            // shared commander
            ServerInterface = new CmdServerInterface(this);
            IfcExporter     = new CmdIfcExporterAPI(this, uidoc);

            // foreach form and context that has a separate commander create it here
            if (form is BimServerLoginForm)
            {
                BimServerLogin = new CmdBimServerLogin((BimServerLoginForm)form, uidoc);
                return;
            }

            if (form is BimServerExportForm)
            {
                BimServerExportForm qx = (BimServerExportForm)form;
                BimServerExport = new CmdBimServerExport(qx, uidoc);
                ServerInterface.ReportStatus = qx.ReportStatus;
                return;
            }

            if (form is BimServerExchangeForm)
            {
                BimServerExchangeForm ex = (BimServerExchangeForm)form;
                BimServerExchange            = new CmdBimServerExchange(ex, uidoc);
                ServerInterface.ReportStatus = ex.ReportStatus;
                return;
            }

            if (form is ProcessingStatusForm)
            {
                ProcessingStatusForm sx = (ProcessingStatusForm)form;
                ProcessingStatus             = new CmdProcessingStatus(sx);
                ServerInterface.ReportStatus = sx.ReportStatus;
                return;
            }

            throw new IcnException($"Unhandled Form of type '{form.GetType().Name}'", 20, "Commander");
        }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
 internal CmdProcessingStatus(ProcessingStatusForm form)
 {
     Form = form;
 }