public void runSlideshow(int startIndex) { if (startIndex == -1) { startIndex = 0; } AnomalousMvcContext context = slideshow.createContext(ResourceProvider, standaloneController.GUIManager, startIndex); context.RuntimeName = editorController.EditorContextRuntimeName; context.setResourceProvider(ResourceProvider); context.BlurAction = "Common/Blur"; CallbackAction blurAction = new CallbackAction("Blur", blurContext => { NavigationModel model = blurContext.getModel <NavigationModel>(Medical.SlideshowProps.BaseContextProperties.NavigationModel); Slide slide = slideshow.get(model.CurrentIndex); if (SlideshowContextBlurred != null) { SlideshowContextBlurred.Invoke(blurContext); } ThreadManager.invoke(new Action(() => { if (lastEditSlide == slide) { if (SlideSelected != null) { SlideSelected.Invoke(null, IEnumerableUtil <Slide> .EmptyIterator); } } if (SlideSelected != null) { SlideSelected.Invoke(slide, IEnumerableUtil <Slide> .EmptyIterator); } })); }); context.Controllers["Common"].Actions.add(blurAction); if (SlideshowContextStarting != null) { SlideshowContextStarting.Invoke(context); } standaloneController.TimelineController.setResourceProvider(editorController.ResourceProvider); standaloneController.MvcCore.startRunningContext(context); }