public ViewportController(IContainer container)
 {
     _container       = container;
     _profileService  = container.Resolve <IProfileService>();
     _viewportService = container.Resolve <IViewportService>();
     _dcsWorldManager = container.Resolve <IDcsWorldManager>();
 }
Пример #2
0
 public SelectInitialViewportsWizardStepViewModel(IContainer container)
     : base(container)
 {
     _viewportService = container.Resolve <IViewportService>();
     _dcsWorldManager = container.Resolve <IDcsWorldManager>();
     _profileService  = container.Resolve <IProfileService>();
 }
        public override void Initialize()
        {
            // testing
            UnitEntity e = unitBuilder.CreateUnitEntity(UnitEntityType.Cube);
            categoriseComponents(e);

            vpService = (IViewportService)this.Game.Services.GetService(typeof(IViewportService));
            vpService.MainViewChanged += new ViewportService.ViewportChangedHandler(vpService_MainViewChanged);
            this.mapViewport = vpService.MainView;

            base.Initialize();
        }
        protected override Task RegisterContainerItemsAsync(IContainer container)
        {
            container.Register <IViewportService, ViewportService>().AsSingleton().UsingConstructor(() => new ViewportService(container));

            var eventRegistry = container.Resolve <ApplicationEventRegistry>();

            //eventRegistry.PopulateSettings += PopulateSettings;

            _dcsWorldManager = container.Resolve <IDcsWorldManager>();
            _viewportService = container.Resolve <IViewportService>();

            return(base.RegisterContainerItemsAsync(container));
        }
        public override void Initialize()
        {
            // testing
            UnitEntity e = unitBuilder.CreateUnitEntity(UnitEntityType.Cube);

            categoriseComponents(e);

            vpService = (IViewportService)this.Game.Services.GetService(typeof(IViewportService));
            vpService.MainViewChanged += new ViewportService.ViewportChangedHandler(vpService_MainViewChanged);
            this.mapViewport           = vpService.MainView;

            base.Initialize();
        }
Пример #6
0
 private void initViewport()
 {
     this.vpService   = (IViewportService)this.Game.Services.GetService(typeof(IViewportService));
     this.mapViewport = this.vpService.MainView;
     this.vpService.MainViewChanged += new ViewportService.ViewportChangedHandler(viewport_MainViewChanged);
 }
Пример #7
0
 private void initViewport()
 {
     this.vpService = (IViewportService)this.Game.Services.GetService(typeof(IViewportService));
     this.mapViewport = this.vpService.MainView;
     this.vpService.MainViewChanged += new ViewportService.ViewportChangedHandler(viewport_MainViewChanged);
 }