public VrManipulationService(IEventRoutingService eventRoutingService, IViewService viewService, IGlobalObjectService globalObjectService) { this.viewService = viewService; this.globalObjectService = globalObjectService; eventRoutingService.Subscribe <INewFrameEvent>(typeof(IVrManipulationService), nameof(OnNewFrame), OnNewFrame); eventRoutingService.RegisterServiceDependency(typeof(IRenderService), typeof(IVrManipulationService)); }
public SceneTreeGui(IEventRoutingService eventRoutingService, IWorldTreeService worldTreeService, IViewService viewService, IPresentationGuiCommands commands, ICommonGuiObjects commonGuiObjects) { itemIndex = new Dictionary <ISceneNode, TreeItem>(); this.worldTreeService = worldTreeService; this.viewService = viewService; this.commands = commands; eyeIcon = Icon.FromResource("Clarity.Ext.Gui.EtoForms.Resources.eye_icon.ico"); sceneIcon = Icon.FromResource("Clarity.Ext.Gui.EtoForms.Resources.scene_icon.ico"); viewIcon = Icon.FromResource("Clarity.Ext.Gui.EtoForms.Resources.view_icon.ico"); layoutIcon = Icon.FromResource("Clarity.Ext.Gui.EtoForms.Resources.layout_icon.ico"); entityIcon = Icon.FromResource("Clarity.Ext.Gui.EtoForms.Resources.entity_icon.ico"); whiteIcon = Icon.FromResource("Clarity.Ext.Gui.EtoForms.Resources.white_icon.ico"); rootItem = new TreeItem { Text = "GuiRoot", Expanded = true }; treeView = new TreeView { Width = 250, DataStore = rootItem, ContextMenu = commonGuiObjects.SelectionContextMenu }; //RebuildFromRoot(); eventRoutingService.RegisterServiceDependency(typeof(ISceneTreeGui), typeof(IWorldTreeService)); eventRoutingService.Subscribe <IWorldTreeUpdatedEvent>(typeof(ISceneTreeGui), nameof(OnWorldUpdated), OnWorldUpdated); eventRoutingService.Subscribe <IAppModeChangedEvent>(typeof(ISceneTreeGui), nameof(OnAppModeChanged), OnAppModeChanged); treeView.SelectionChanged += OnSelectionChanged; treeView.NodeMouseClick += OnNodeMouseClick; treeView.MouseDoubleClick += OnNodeMouseDoubleClick; viewService.Update += OnViewServiceUpdate; }
public UcGui(IDiContainer di, IEventRoutingService eventRoutingService) { this.di = di; renderControl = new UcRenderGuiControl(); this.eventRoutingService = eventRoutingService; eventRoutingService.RegisterServiceDependency(typeof(UcGui), typeof(IWorldTreeService)); eventRoutingService.SubscribeToAllAfter(typeof(UcGui).FullName, OnEveryEvent, true); }
public ViewService(IEventRoutingService eventRoutingService, IRenderLoopDispatcher renderLoopDispatcher, IStoryService storyService) { this.storyService = storyService; model = AmFactory.Create <ViewServiceModel>(); eventRoutingService.RegisterServiceDependency(typeof(IViewService), typeof(IWorldTreeService)); eventRoutingService.Subscribe <IAppModeChangedEvent>(typeof(IViewService), nameof(OnAppModeChange), OnAppModeChange); renderLoopDispatcher.Update += OnUpdate; }
public WindowManager(IMainForm mainForm, IEventRoutingService eventRoutingService, IWorldTreeService worldTreeService, IViewService viewService) { this.mainForm = mainForm; this.worldTreeService = worldTreeService; this.viewService = viewService; renderControls = new IRenderGuiControl[] { mainForm.RenderControl }; eventRoutingService.RegisterServiceDependency(typeof(IWindowManager), typeof(IWorldTreeService)); eventRoutingService.Subscribe <IAppModeChangedEvent>(typeof(IWindowManager), nameof(OnAppModeChanged), OnAppModeChanged); eventRoutingService.SubscribeToAllAfter(typeof(IWindowManager).FullName, OnEveryEvent, true); }
public StoryService(IEventRoutingService eventRoutingService, IWorldTreeService worldTreeService, IRenderLoopDispatcher renderLoopDispatcher, IReadOnlyList <IStoryLayout> allLayouts) { this.worldTreeService = worldTreeService; layoutsByType = allLayouts.ToDictionary(x => x.Type, x => x); layouts = new Dictionary <ISceneNode, IStoryLayout>(); transactions = new List <object>(); editingScene = Scene.Create(AmFactory.Create <SceneNode>()); editingScene.BackgroundColor = Color4.Black; editSceneComponent = AmFactory.Create <StoryFlowchartEditSceneComponent>(); editingScene.Root.Components.Add(editSceneComponent); eventRoutingService.RegisterServiceDependency(typeof(IStoryService), typeof(IWorldTreeService)); eventRoutingService.Subscribe <IWorldTreeUpdatedEvent>(typeof(IStoryService), nameof(OnWorldUpdated), OnWorldUpdated); renderLoopDispatcher.Update += editingScene.Root.Update; }
public UcRenderService(IDiContainer di, IEventRoutingService eventRoutingService, IGlobalObjectService globalObjectService, IWindowingSystem windowingSystem, IStandardMaterialCache standardMaterialCache) { this.di = di; this.globalObjectService = globalObjectService; this.standardMaterialCache = standardMaterialCache; eventRoutingService.RegisterServiceDependency(typeof(IRenderService), typeof(IStandardMaterialCache)); eventRoutingService.Subscribe <ILateUpdateEvent>(typeof(IRenderService), "OnLateUpdate", e => { Render(windowingSystem.RenderControl, e.FrameTime.TotalSeconds); }); }