public ScratchAreaController(SaveableClipboard clipboard) { this.clipboard = clipboard; rootFolder = new ScratchAreaRootFolder("Scratch Area", MedicalConfig.UserDocRoot); rootFolder.loadInfo(); }
public void initializeControllers(BackgroundScene background, LicenseManager licenseManager) { //Background this.background = background; this.LicenseManager = licenseManager; atlasPluginManager = new AtlasPluginManager(this); atlasPluginManager.PluginLoadError += new Medical.AtlasPluginManager.PluginMessageDelegate(atlasPluginManager_PluginLoadError); atlasPluginManager.manageInstalledPlugins(); clipboard = new SaveableClipboard(); //Documents DocumentController = new DocumentController(); //MDI Layout mdiLayout = new MDILayoutManager(); //SceneView MyGUIInterface myGUI = MyGUIInterface.Instance; sceneViewController = new SceneViewController(mdiLayout, medicalController.EventManager, medicalController.MainTimer, medicalController.PluginManager.RendererPlugin.PrimaryWindow, myGUI.OgrePlatform.RenderManager, background); sceneViewController.WindowCreated += sceneViewController_WindowCreated; sceneViewController.WindowDestroyed += sceneViewController_WindowDestroyed; sceneViewController.DefaultBackgroundColor = new Color(0.274f, 0.274f, 0.274f); sceneStatsDisplayManager = new SceneStatsDisplayManager(sceneViewController, OgreInterface.Instance.OgrePrimaryWindow.OgreRenderTarget); sceneStatsDisplayManager.StatsVisible = MedicalConfig.EngineConfig.ShowStatistics; MedicalConfig.EngineConfig.ShowStatsToggled += engineConfig => sceneStatsDisplayManager.StatsVisible = engineConfig.ShowStatistics; lightManager = PluginManager.Instance.RendererPlugin.createSceneViewLightManager(); //Measurement grid measurementGrid = new MeasurementGrid("MeasurementGrid", sceneViewController); SceneUnloading += measurementGrid.sceneUnloading; SceneLoaded += measurementGrid.sceneLoaded; //Image Renderer imageRenderer = new ImageRenderer(medicalController, sceneViewController, idleHandler); imageRenderer.Background = background; imageRenderer.ImageRenderStarted += measurementGrid.ScreenshotRenderStarted; imageRenderer.ImageRenderCompleted += measurementGrid.ScreenshotRenderCompleted; //Anatomy Controller anatomyController = new AnatomyController(); //Medical states medicalStateController = new MedicalStateController(imageRenderer, medicalController); SceneLoaded += medicalStateController.sceneLoaded; SceneUnloading += medicalStateController.sceneUnloading; //Movement sequences movementSequenceController = new MovementSequenceController(medicalController); this.SceneLoaded += movementSequenceController.sceneLoaded; musclePositionController = new MusclePositionController(medicalController.MainTimer, this); SceneLoaded += SleepyActorRepository.SceneLoaded; SceneUnloading += SleepyActorRepository.SceneUnloading; //Props propFactory = new PropFactory(this); //Timeline timelineController = new TimelineController(this); viewHostFactory = new MyGUIViewHostFactory(mdiLayout); mvcCore = new AnomalousMvcCore(this, viewHostFactory); //Patient data patientDataController = new PatientDataController(this); //Tasks taskController = new TaskController(); anatomyTaskManager = new AnatomyTaskManager(taskController, guiManager); //Coroutine Coroutine.SetTimer(medicalController.MainTimer); //Notifications notificationManager = new NotificationGUIManager(); layerController = new LayerController(); //Create virtual texture manager virtualTextureSceneViewLink = new VirtualTextureSceneViewLink(this); }