public void initialize(StandaloneController standaloneController) { GUIManager guiManager = standaloneController.GUIManager; guiManager.MainGUIShown += new Action(guiManager_MainGUIShown); guiManager.MainGUIHidden += new Action(guiManager_MainGUIHidden); //Prop Mover MedicalController medicalController = standaloneController.MedicalController; propMover = new SimObjectMover("Props", medicalController.PluginManager.RendererPlugin, medicalController.EventManager, standaloneController.SceneViewController); this.standaloneController = standaloneController; editorTimelineController = new TimelineController(standaloneController); standaloneController.giveGUIsToTimelineController(editorTimelineController); scratchAreaController = new ScratchAreaController(standaloneController.Clipboard); //Controller editorController = new EditorController(standaloneController, editorTimelineController); standaloneController.DocumentController.addDocumentHandler(new ProjectDocumentHandler(editorController)); standaloneController.DocumentController.UnknownDocumentHander = new UnknownDocumentHandler(editorController); propEditController = new PropEditController(propMover); //UI Helpers editorUICallback = new EditorUICallback(standaloneController, editorController, propEditController); typeControllerManager = new TypeControllerManager(standaloneController, this); typeControllerManager.FilesystemWatcherCreated += typeControllerManager_FilesystemWatcherCreated; //Dialogs scratchArea = new ScratchArea(scratchAreaController, editorUICallback); guiManager.addManagedDialog(scratchArea); projectExplorer = new ProjectExplorer(editorController, typeControllerManager); guiManager.addManagedDialog(projectExplorer); //Tasks Menu TaskController taskController = standaloneController.TaskController; aspectRatioTask = new AspectRatioTask(standaloneController.SceneViewController); if (MedicalConfig.ShowDeveloperTools) { taskController.addTask(new MDIDialogOpenTask(scratchArea, "Medical.ScratchArea", "Scratch Area", "EditorIcons.ScratchAreaIcon", TaskMenuCategories.Create)); taskController.addTask(new MDIDialogOpenTask(projectExplorer, "Medical.EditorTools", "Editor Tools", "EditorIcons.EditorTools", TaskMenuCategories.Create)); taskController.addTask(aspectRatioTask); } editorTaskbarFactory = new EditorTaskbarFactory(editorController); standaloneController.ViewHostFactory.addFactory(new EditorInfoBarFactory()); standaloneController.ViewHostFactory.addFactory(new TextEditorComponentFactory()); standaloneController.ViewHostFactory.addFactory(editorTaskbarFactory); CommonEditorResources.initialize(standaloneController); editorController.ProjectChanged += editorController_ProjectChanged; //Editor Views standaloneController.ViewHostFactory.addFactory(new OffsetSequenceEditorFactory(standaloneController.MedicalController, standaloneController.Clipboard)); }
public PropFactory(StandaloneController standaloneController) { this.medicalController = standaloneController.MedicalController; standaloneController.SceneLoaded += new SceneEvent(standaloneController_SceneLoaded); standaloneController.SceneUnloading += new SceneEvent(standaloneController_SceneUnloading); }
public ImageRenderer(MedicalController controller, SceneViewController sceneViewController, IdleHandler idleHandler) { this.controller = controller; this.sceneViewController = sceneViewController; this.idleHandler = idleHandler; TransparencyController.createTransparencyState(TransparencyStateName); OgreResourceGroupManager.getInstance().createResourceGroup(RenderTextureResourceGroup); }
public StandaloneController(App app) { medicalConfig = new MedicalConfig(); this.app = app; guiManager = new GUIManager(); guiManager.MainGUIShown += guiManager_MainGUIShown; guiManager.MainGUIHidden += guiManager_MainGUIHidden; MyGUIInterface.OSTheme = PlatformConfig.ThemeFile; String title; if (MedicalConfig.BuildName != null) { title = String.Format("{0} {1}", app.Title, MedicalConfig.BuildName); } else { title = app.Title; } mainWindow = new MainWindow(title); mainWindow.Closed += mainWindow_Closed; //Setup DPI float pixelScale = mainWindow.WindowScaling; if (MedicalConfig.PixelScaleOverride > 0.5f) { pixelScale = MedicalConfig.PixelScaleOverride; } float scaleFactor = pixelScale; pixelScale += MedicalConfig.PlatformExtraScaling * scaleFactor; switch (MedicalConfig.ExtraScaling) { case UIExtraScale.Smaller: pixelScale -= .15f * scaleFactor; break; case UIExtraScale.Larger: pixelScale += .25f * scaleFactor; break; } ScaleHelper._setScaleFactor(pixelScale); //Initialize engine medicalController = new MedicalController(mainWindow); idleHandler = new IdleHandler(medicalController.MainTimer.OnIdle); PointerManager.Instance.Visible = false; ((RenderWindow)OgreInterface.Instance.OgrePrimaryWindow.OgreRenderTarget).DeactivateOnFocusChange = false; }
public MedicalStateController(ImageRenderer imageRenderer, MedicalController medicalController) { this.imageRenderer = imageRenderer; imageProperties = new ImageRendererProperties(); imageProperties.Width = 100; imageProperties.Height = 100; imageProperties.UseWindowBackgroundColor = false; imageProperties.CustomBackgroundColor = BACK_COLOR; imageProperties.AntiAliasingMode = 2; imageProperties.UseActiveViewportLocation = true; imageProperties.OverrideLayers = false; imageProperties.TransparentBackground = true; imageProperties.ShowBackground = false; imageProperties.ShowWatermark = false; imageProperties.ShowUIUpdates = false; this.medicalController = medicalController; }
public PatientDataController(StandaloneController standaloneController) { this.standaloneController = standaloneController; this.medicalStateController = standaloneController.MedicalStateController; this.medicalController = standaloneController.MedicalController; }
public MedicalUpdate(MedicalController controller) { this.controller = controller; }