public Tuple<IJointShowEditorWindow, JointShowEditorController> CreateEditorWindow(IJointShow showModel) { JointShowEditorWindow window = new JointShowEditorWindow(showModel); JointShowEditorController controller = new JointShowEditorController(window, showModel, new MessageShower()); return new Tuple<IJointShowEditorWindow, JointShowEditorController>(window, controller); }
public virtual void Show(IJointShow jointShow, bool launchShow) { List<IShow> shows = jointShow.ShowOrderShows; if (shows.Count == 0) return; PowerPoint.Application application = new PowerPoint.Application(); PowerPoint.Presentations applicationPresentations = application.Presentations; PowerPoint.Presentation joinedPresentation = applicationPresentations.Add(); for (int i = 0; i < shows.Count; i++) { PowerPoint.Presentation sourcePresentation = applicationPresentations.Open(shows[i].Path, MsoTriState.msoFalse, MsoTriState.msoTrue, MsoTriState.msoFalse); CopySlides(sourcePresentation, joinedPresentation); sourcePresentation.Close(); Marshal.ReleaseComObject(sourcePresentation); } if (launchShow) { PowerPoint.SlideShowSettings slideShowSettings = joinedPresentation.SlideShowSettings; slideShowSettings.Run(); GC.Collect(); GC.WaitForPendingFinalizers(); Marshal.ReleaseComObject(slideShowSettings); } Marshal.ReleaseComObject(joinedPresentation); Marshal.ReleaseComObject(applicationPresentations); Marshal.ReleaseComObject(application); }
public Tuple<IJointShowEditorWindow, JointShowEditorController> CreateEditorWindow(IJointShow showModel) { FakeWindow = new FakeJointShowEditorWindow(showModel); FakeMessageShower = new FakeMessageShower(); FakeEditorController = new JointShowEditorController(FakeWindow, showModel, FakeMessageShower); return new Tuple<IJointShowEditorWindow, JointShowEditorController>(FakeWindow, FakeEditorController); }
public override void GeneratePresentation(IJointShow selectedShow, bool launchPresentation) { Assert.NotNull(selectedShow); if (launchPresentation) PresentationCount++; else GenerateCount++; }
public FakeJointShowEditorWindow(IJointShow showModel) : base(showModel) { InitializeComponent(); JointShowName = showModel.Name; fakeShowOrderView.DataSource = showModel.ShowOrderDataSource; fakeImportedShowView.DataSource = showModel.ImportedShowsDataSource; }
public JointShowEditorWindow(IJointShow model) : base(model) { InitializeComponent(); jointShowNameTextBox.Text = model.Name; orderView.DataSource = model.ShowOrderDataSource; importedShowsView.DataSource = model.ImportedShowsDataSource; importedShowsView.CellDoubleClick += importedShowsView_CellDoubleClick; }
public override void CopyJointShow(IJointShow show) { IJointShow showCopy = PresenterUtils.DeepClone(show); showCopy.ShowUpdated += newShow_ShowUpdated; while (_jointShows.Any(jointShow=>jointShow.Name == showCopy.Name)) showCopy.Name += " - Copy"; _jointShows.Add(showCopy); }
public JointShowEditorController(IJointShowEditorWindow window, IJointShow showToEdit, IMessageShower messageShower) { _window = window; _showToEdit = showToEdit; _messageShower = messageShower; _window.AcceptRequested += window_AcceptRequested; _window.CancelRequested += window_CancelRequested; _window.ImportRequested += window_ImportRequested; _window.AddToShowRequested += window_AddToShowRequested; _window.RemoveFromShowRequested += window_RemoveFromShowRequested; _window.DeletePresentationRequested += window_DeletePresentationRequested; _window.MovePresentationUpRequested += window_MovePresentationUpRequested; _window.MovePresentationDownRequested += window_MovePresentationDownRequested; }
public virtual void RemoveJointShow(IJointShow show) { show.ShowUpdated -= newShow_ShowUpdated; _jointShows.Remove(show); }
public virtual void GeneratePresentation(IJointShow jointShow, bool launchPresentation) { _slideShowManager.Show(jointShow, launchPresentation); }
public abstract void CopyJointShow(IJointShow show);
public override void CopyJointShow(IJointShow show) { }
private void AppendShowToShowOrder(IJointShow jointShow, IShow show) { jointShow.AddShowToShowOrder(show, jointShow.ShowOrderShowsCount); }
protected BaseJointShowEditorWindow(IJointShow showModel) { _showModel = showModel; }
public MockJointShowEditorWindow(IJointShow showModel) : base(showModel) { }