private bool HandleVideoDownloaded(string filePath) { _siteContainer.ParentBundle.PowerPointSingleton.Connect(); var activePresentation = _siteContainer.ParentBundle.PowerPointSingleton.GetActivePresentation(); var allowVideoInsert = activePresentation != null && File.Exists(activePresentation.FullName); if (allowVideoInsert) { using (var formComplete = new FormVideoDownloadComplete(filePath)) { var result = formComplete.ShowDialog(_siteContainer.ParentBundle.MainForm); if (result == DialogResult.Abort) { _siteContainer.ParentBundle.ShowFloater(new FloaterRequestedEventArgs { AfterShow = () => { FormProgress.SetTitle("Chill-Out for a few seconds...\nGenerating slides so your presentation can look AWESOME!"); FormProgress.ShowOutputProgress(); _siteContainer.ParentBundle.PowerPointSingleton.InsertVideoIntoActivePresentation(filePath); FormProgress.CloseProgress(); } }); } return(true); } } return(false); }
private bool HandleVideoDownloaded(string filePath) { PowerPointSingleton.Instance.Connect(); var activePresentation = PowerPointSingleton.Instance.GetActivePresentation(); var allowVideoInsert = activePresentation != null && File.Exists(activePresentation.FullName); if (allowVideoInsert) { using (var formComplete = new FormVideoDownloadComplete(filePath)) { var result = formComplete.ShowDialog(FormMain.Instance); if (result == DialogResult.Abort) AppManager.Instance.ShowFloater(() => { FormProgress.ShowProgress(); FormProgress.SetTitle("Chill-Out for a few seconds...\nGenerating slides so your presentation can look AWESOME!"); PowerPointSingleton.Instance.InsertVideoIntoActivePresentation(filePath); FormProgress.CloseProgress(); }, null); return true; } } return false; }