public AdminController(IGameService gameService, IHoleService holeService, IPlayerService playerService, IRankingService rankingService)
 {
     _gameService = gameService;
     _holeService = holeService;
     _playerService = playerService;
     _rankingService = rankingService;
 }
Exemplo n.º 2
0
        public GameViewModel(IGameService gameService)
        {
            this.gameService = gameService;

            this.StageDownCommand = new DelegateCommand(StageDown, CanStageDown);
            this.StageUpCommand = new DelegateCommand(StageUp, CanStageUp);
        }
Exemplo n.º 3
0
 public GameController(IGameService gameService, IHoleService holeService, IPlayerService playerService, IShotTypeService scoreTypeService)
 {
     _gameService = gameService;
     _holeService = holeService;
     _playerService = playerService;
     _scoreTypeService = scoreTypeService;
 }
Exemplo n.º 4
0
        //
        // GET: /Game/
         
        public GameController(IGameService gameService)
        {
            //IGameService gameService = new GameService(new GameRepository(), new TeamRepository());

            _gameService = gameService;
            _gameMapper = new GameMapper();
        }
        public SolverService(
            [NotNull] IMessageBus messageBus,
            [NotNull] IGameService gameService,
            [NotNull] IBoardSolverService boardSolverService,
            [NotNull] IDispatcher dispatcher)
        {
            if (messageBus == null)
            {
                throw new ArgumentNullException(nameof(messageBus));
            }

            if (gameService == null)
            {
                throw new ArgumentNullException(nameof(gameService));
            }

            if (boardSolverService == null)
            {
                throw new ArgumentNullException(nameof(boardSolverService));
            }

            if (dispatcher == null)
            {
                throw new ArgumentNullException(nameof(dispatcher));
            }

            this.messageBus = messageBus;
            this.gameService = gameService;
            this.boardSolverService = boardSolverService;
            this.dispatcher = dispatcher;

            this.messageBus.Subscribe<BoardScrambled>(this.OnBoardScrambled);
            this.messageBus.Subscribe<BoardResetted>(this.OnBoardResetted);
            this.messageBus.Subscribe<SlideHappened>(this.OnSlideHappened);
        }
Exemplo n.º 6
0
 public AdminController(IRoundService roundService, ISeriesService seriesService, ITeamService teamService, IGameService gameService)
 {
     _seriesService = seriesService;
     _roundService  = roundService;
     _teamService   = teamService;
     _gameService   = gameService;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Initialize objects
 /// </summary>
 public TrophiesPage()
 {
     InitializeComponent();
     _svc = new GameService();
     InitializeInformation("");
     CloseButton.Click += new RoutedEventHandler(CloseButton_Click);
 }
Exemplo n.º 8
0
 public GameController(IGameService game, IReportService reportService, IGameCommentService gameComment, IConfigInfoService configInfoService)
 {
     _game = game;
     _reportService = reportService;
     _gameComment = gameComment;
     _configInfoService = configInfoService;
 }
 public LadderService(IUnitOfWork unitOfWork, IGameService gameService, IMapTemplateProvider mapTemplateProvider, IEventAggregator eventAggregator)
 {
     this.unitOfWork = unitOfWork;
     this.gameService = gameService;
     this.mapTemplateProvider = mapTemplateProvider;
     this.eventAggregator = eventAggregator;
 }
Exemplo n.º 10
0
 public void registerService(IGameService gameService)
 {
     services.Add(gameService);
     foreach (Entity entity in entities.Values)
     {
         gameService.registerEntityIfNeeded(entity);
     }
 }
Exemplo n.º 11
0
        public GameUI(IGameService gameservice, IController controller)
        {
            InitializeComponent();

            this.gameService = gameservice;
            this.controller = controller;
            SubscribeToGameEvents();
        }
        public EventController(IEventService eventService
			, IExcelService excelService
			, IGameService gameService)
        {
            _eventService = eventService;
            _excelService = excelService;
            _gameService = gameService;
        }
Exemplo n.º 13
0
 public GameController(IGameService gameService, IShotService shotService, IHoleService holeService, IPlayerService playerService, IRankingService rankingService)
 {
     _gameService = gameService;
     _shotService = shotService;
     _holeService = holeService;
     _playerService = playerService;
     _rankingService = rankingService;
 }
        public TeamController(ITeamService teamService
			, IExcelService excelService
			, IGameService gameService)
        {
            _teamService = teamService;
            _excelService = excelService;
            _gameService = gameService;
        }
Exemplo n.º 15
0
        public GameServiceTests()
        {
            m_kernel = new StandardKernel();
            m_kernel.Load(Assembly.GetExecutingAssembly());

            m_games = m_kernel.Get<IGameService>();
            m_games.ApiKey = Settings1.Default.ApiKey;
        }
Exemplo n.º 16
0
        public GamesController(IRepository<Game> gameRepository, IUserRepository userRepository, IGameService gameService)
            : base(userRepository)
        {
            Check.Require(gameRepository != null, "gameRepository may not be null");
            Check.Require(gameService != null, "gameService may not be null");

            this.gameRepository = gameRepository;
            this.gameService = gameService;
        }
Exemplo n.º 17
0
 public GameControllerTest()
 {
     IBoard board = new Board();
     IGameManager gameManager = new GameManager(board);
     gameService = new GameService(gameManager);
     IComputerPlayer computerPlayer = new ComputerPlayer(gameService);
     IHumanPlayer humanPlayer = new HumanPlayer(gameService);
     controller = new Controller(computerPlayer, humanPlayer, gameService);
 }
 public TournamentService(
     IUnitOfWork unitOfWork, 
     IGameService gameService, 
     IMapTemplateProvider mapTemplateProvider)
 {
     this.unitOfWork = unitOfWork;
     this.gameService = gameService;
     this.mapTemplateProvider = mapTemplateProvider;
 }
        public RecalcGameStateService(int gameId, IRepository<Game> gameRepository, IGameService gameService)
        {
            Check.Require(gameRepository != null, "gameRepository may not be null");
            Check.Require(gameService != null, "gameService may not be null");

            this.gameId = gameId;
            this.gameRepository = gameRepository;
            this.gameService = gameService;
        }
Exemplo n.º 20
0
 public BaseServiceTests()
 {
     _onlineMatchList = new List<MatchState>();
     _onlinePlayerList = new List<PlayerProfile>();
     _dataController = new DataController();
     _gameController = new GameController(_dataController, _onlineMatchList);
     _infoController = new InformationController(_dataController, _onlinePlayerList);
     _service = new BaseService(_gameController, _infoController);
 }
        public NotificationHub(ILifetimeScope scope)
            : base()
        {
            var lifetimeScope = scope.BeginLifetimeScope("AutofacWebRequest");

            this.gameService = lifetimeScope.Resolve<IGameService>();
            this.unitOfWork = lifetimeScope.Resolve<IUnitOfWork>();
            this.userManager = lifetimeScope.Resolve<UserManager<User>>();
        }
        public GameServiceController(IUserRepository userRepository, IGameService gameService, IGameReportService gameReportService)
            : base(userRepository)
        {
            Check.Require(gameService != null, "gameService may not be null");
            Check.Require(gameReportService != null, "gameReportService may not be null");

            this.gameService = gameService;
            this.gameReportService = gameReportService;
        }
        public TeamGameboardController(IRepository<Team> teamRepository, IUserRepository userRepository, IGameService gameService)
            : base(userRepository)
        {
            Check.Require(teamRepository != null, "teamRepository may not be null");
            Check.Require(gameService != null, "gameService may not be null");

            this.teamRepository = teamRepository;
            this.gameService = gameService;
        }
Exemplo n.º 24
0
 public TestController(IManageUsersService manageUsersBll, IArticleService articleService, IMusicService musicService, IVideoService videoService, IGameService gameService, IConfigInfoService configInfoService, IArticleImagesService articleImagesService)
 {
     _manageUsersBll = manageUsersBll;
     _articleService = articleService;
     _musicService = musicService;
     _videoService = videoService;
     _gameService = gameService;
     _configInfoService = configInfoService;
     _articleImagesService = articleImagesService;
 }
Exemplo n.º 25
0
        public GamesController(IGameService gameService,
            ILogger logger,
            IGenreService genreService,
            IPlarfotmTypeService platformTypeService,
            IPublisherService publisherService)
        {
            _gameService = gameService;
            _logger = logger;
            _genreService = genreService;
            _publisherService = publisherService;
            _plarfotmTypeService = platformTypeService;

            Mapper.CreateMap<CreateGameViewModel, GameDTO>()
                .ForMember(g => g.Genres, m => m.Ignore())
                .ForMember(g => g.PlatformTypes, m => m.Ignore())
                .ForMember(g => g.Publisher, m => m.Ignore());

            Mapper.CreateMap<CreateGameViewModel, GameViewModel>()
                .ForMember(g => g.Genres, m => m.Ignore())
                .ForMember(g => g.PlatformTypes, m => m.Ignore())
                .ForMember(g => g.Publishers, m => m.Ignore());

            Mapper.CreateMap<FilterViewModel, FilterDTO>()
                .ForMember(f => f.From, m => m.MapFrom(fvm => Convert.ToDecimal(fvm.From)))
                .ForMember(f => f.To, m => m.MapFrom(fvm => Convert.ToDecimal(fvm.To)));

            Mapper.CreateMap<GameDTO, GameDetailsViewModel>()
                .ForMember(g => g.Genres,
                    m =>
                        m.MapFrom(
                            gamedto =>
                                new MultiSelectList(
                                    gamedto.Genres.Select(
                                        genre =>
                                            new SelectListItem() { Value = genre.GenreId.ToString(), Text = genre.Name }))))
                .ForMember(pt => pt.PlatformTypes,
                    m =>
                        m.MapFrom(
                            ptDto =>
                                new MultiSelectList(
                                    ptDto.PlatformTypes.Select(
                                        platformType =>
                                            new SelectListItem()
                                            {
                                                Value = platformType.PlatformTypeId.ToString(),
                                                Text = platformType.Name
                                            }))))
                .ForMember(g => g.PublisherCompanyName, m => m.MapFrom(g => g.Publisher.CompanyName));
        }
Exemplo n.º 26
0
        /// <summary>
        /// Creates a new instance of Program class.
        /// </summary>
        private Program()
        {
            /* get essential commanding services */
            this.presentation = Engine.GetService(typeof(IPresentationService)) as IPresentationService;
            this.game = Engine.GetService(typeof(IGameService)) as IGameService;

            /* no service, no game */
            if ((this.presentation == null) || (this.game == null))
            {
                throw new InvalidOperationException();
            }

            /* show a simple splash screen */
            SplashScreen splashScreen = new SplashScreen();
            splashScreen.FormClosed += new FormClosedEventHandler(OnSplashScreenFormClosed);

            /* show splash */
            this.MainForm = splashScreen;
        }
Exemplo n.º 27
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GamesController"/> class.
        /// </summary>
        /// <param name="gameRepository"> Game repository that is responsible or providing basic CRUD functionality related to games including retrieving, updating, and deleting them from the persistence store.</param>
        /// <param name="gameTypeMapper">Type mapper that maps instances of the Game domain objects to their corresponding DTO type.</param>
        /// <param name="gameService">Services that provides persistence-related operations relevant to games.</param>
        public GamesController(IGameRepository gameRepository, IGameTypeMapper gameTypeMapper, IGameService gameService)
        {
            if (gameRepository == null)
            {
                throw new ArgumentNullException("gameRepository", "gameRepository cannot be null.");
            }

            if (gameTypeMapper == null)
            {
                throw new ArgumentNullException("gameTypeMapper", "gameTypeMapper cannot be null.");
            }

            if (gameService == null)
            {
                throw new ArgumentNullException("gameService", "gameService cannot be null.");
            }

            this.gameRepository = gameRepository;
            this.gameTypeMapper = gameTypeMapper;
            this.gameService = gameService;
        }
Exemplo n.º 28
0
 public GameController(IGameService gameService,
     ICommentService commentServise, 
     ILogger logger, 
     IGenreService genreService, 
     IPlarfotmTypeService plarfotmTypeService)
 {
     _gameService = gameService;
     _commentService = commentServise;
     _logger = logger;
     _genreService = genreService;
     _plarfotmTypeService = plarfotmTypeService;
     Mapper.CreateMap<CommentDTO, CommentViewModel>()
         .ForMember( c => c.ParentComment, m => m.Ignore() );
     Mapper.CreateMap<CommentViewModel, CommentDTO>();
     Mapper.CreateMap<GameDTO, GameDetailsViewModel>()
         .ForMember(g => g.Genres,
             m =>
                 m.MapFrom(
                     gamedto =>
                         new MultiSelectList(
                             gamedto.Genres.Select(
                                 genre =>
                                     new SelectListItem() { Value = genre.GenreId.ToString(), Text = genre.Name }))))
         .ForMember(pt => pt.PlatformTypes,
             m =>
                 m.MapFrom(
                     ptDto =>
                         new MultiSelectList(
                             ptDto.PlatformTypes.Select(
                                 platformType =>
                                     new SelectListItem()
                                     {
                                         Value = platformType.PlatformTypeId.ToString(),
                                         Text = platformType.Name
                                     }))))
         .ForMember(g => g.PublisherCompanyName, m => m.MapFrom( g => g.Publisher.CompanyName ));
 }
        public GameboardController(
            IRepository<Game> gameRepository,
            IRepository<Task> taskRepository,
            IRepository<Tip> tipRepository,
            IRepository<Code> codeRepository,
            IRepository<BonusTask> bonusTaskRepository,
            IUserRepository userRepository,
            IGameService gameService)
            : base(userRepository)
        {
            Check.Require(gameRepository != null, "gameRepository may not be null");
            Check.Require(taskRepository != null, "taskRepository may not be null");
            Check.Require(tipRepository != null, "tipRepository may not be null");
            Check.Require(codeRepository != null, "codeRepository may not be null");
            Check.Require(bonusTaskRepository != null, "bonusTaskRepository may not be null");
            Check.Require(gameService != null, "gameService may not be null");

            this.gameRepository = gameRepository;
            this.taskRepository = taskRepository;
            this.tipRepository = tipRepository;
            this.codeRepository = codeRepository;
            this.bonusTaskRepository = bonusTaskRepository;
            this.gameService = gameService;
        }
Exemplo n.º 30
0
 public HomeViewModel(
     IGameService gameService)
 {
     _gameService = gameService;
 }
Exemplo n.º 31
0
 public GameCount(IGameService gameService)
 {
     _gameService = gameService;
 }
Exemplo n.º 32
0
 public GameController(IGameService gameService)
 {
     _gameService = gameService;
 }
Exemplo n.º 33
0
 public GameSessionsHub(IGameService gameService, IGameSessionService gameSessionService, IMapper mapper)
 {
     this.gameService        = gameService;
     this.gameSessionService = gameSessionService;
     this.mapper             = mapper;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GameControlViewModel" /> class.
 /// </summary>
 /// <param name="gameService">The game service.</param>
 /// <param name="activeGameRequestHandler">The active game request handler.</param>
 public GameControlViewModel(IGameService gameService, ActiveGameRequestHandler activeGameRequestHandler)
 {
     this.gameService = gameService;
     this.activeGameRequestHandler = activeGameRequestHandler;
 }
 public CommentController(ICommentService commentService, IGameService gameService)
 {
     _commentService = commentService;
     _gameService    = gameService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ModifyCollectionControlViewModel" /> class.
 /// </summary>
 /// <param name="modDefinitionInvalidReplaceHandler">The mod definition invalid replace handler.</param>
 /// <param name="modService">The mod service.</param>
 /// <param name="idGenerator">The identifier generator.</param>
 /// <param name="modCompressMergeProgressHandler">The mod compress merge progress handler.</param>
 /// <param name="modDefinitionAnalyzeHandler">The mod definition analyze handler.</param>
 /// <param name="modDefinitionLoadHandler">The mod definition load handler.</param>
 /// <param name="modDefinitionMergeProgressHandler">The mod definition merge progress handler.</param>
 /// <param name="modFileMergeProgressHandler">The mod file merge progress handler.</param>
 /// <param name="shutDownState">State of the shut down.</param>
 /// <param name="gameService">The game service.</param>
 /// <param name="modMergeService">The mod merge service.</param>
 /// <param name="modCollectionService">The mod collection service.</param>
 /// <param name="modPatchCollectionService">The mod patch collection service.</param>
 /// <param name="localizationManager">The localization manager.</param>
 /// <param name="notificationAction">The notification action.</param>
 public ModifyCollectionControlViewModel(ModDefinitionInvalidReplaceHandler modDefinitionInvalidReplaceHandler, IModService modService, IIDGenerator idGenerator, ModCompressMergeProgressHandler modCompressMergeProgressHandler,
                                         ModDefinitionAnalyzeHandler modDefinitionAnalyzeHandler, ModDefinitionLoadHandler modDefinitionLoadHandler, ModDefinitionMergeProgressHandler modDefinitionMergeProgressHandler,
                                         ModFileMergeProgressHandler modFileMergeProgressHandler, IShutDownState shutDownState, IGameService gameService, IModMergeService modMergeService,
                                         IModCollectionService modCollectionService, IModPatchCollectionService modPatchCollectionService,
                                         ILocalizationManager localizationManager, INotificationAction notificationAction)
 {
     this.modCollectionService      = modCollectionService;
     this.modPatchCollectionService = modPatchCollectionService;
     this.localizationManager       = localizationManager;
     this.gameService                       = gameService;
     this.modMergeService                   = modMergeService;
     this.modDefinitionLoadHandler          = modDefinitionLoadHandler;
     this.modDefinitionAnalyzeHandler       = modDefinitionAnalyzeHandler;
     this.modDefinitionMergeProgressHandler = modDefinitionMergeProgressHandler;
     this.shutDownState                     = shutDownState;
     this.modFileMergeProgressHandler       = modFileMergeProgressHandler;
     this.notificationAction                = notificationAction;
     this.idGenerator                       = idGenerator;
     this.modCompressMergeProgressHandler   = modCompressMergeProgressHandler;
     this.modService = modService;
     this.modDefinitionInvalidReplaceHandler = modDefinitionInvalidReplaceHandler;
 }
 //  3 DI
 public MainPageController(IGameService service, IMapper _mapper)
 {
     gameService = service;
     mapper      = _mapper;
 }
Exemplo n.º 38
0
 public SniperEnemyController(IEnemyService _enemyService, IPathService _pathService, IGameService _gameService, Vector3 _spawnLocation, EnemyScriptableObject _enemyScriptableObject, int currentNodeID, Directions spawnDirection, bool _hasShield) : base(_enemyService, _pathService, _gameService, _spawnLocation, _enemyScriptableObject, currentNodeID, spawnDirection, _hasShield)
 {
     enemyType = EnemyType.SNIPER;
 }
Exemplo n.º 39
0
 public CallOnTableViewComponent(IGameService gameService)
 {
     _gameService = gameService;
 }
Exemplo n.º 40
0
 public DropTokenController(IGameService service, IMapper mapper, ILogger <DropTokenController> logger)
 {
     _service = service;
     _mapper  = mapper;
     _logger  = logger;
 }
Exemplo n.º 41
0
 public ItemService(IMapper mapper, ISessionService sessionService, IGameService gameService, IItemRepository itemRepository)
     : base(mapper, sessionService, gameService, itemRepository)
 {
 }
Exemplo n.º 42
0
 public GameController(ILogger <GameController> logger, IGameService gameService)
 {
     _logger      = logger;
     _gameService = gameService;
 }
Exemplo n.º 43
0
 public ReportController(IReportService reportService, IMapper mapper, IGameService gameService)
 {
     this.reportService = reportService;
     this.mapper        = mapper;
     this.gameService   = gameService;
 }
Exemplo n.º 44
0
 /// <summary>
 /// Initialises a new instance of <see cref="HomeController"/> with custom services(for unit testing).
 /// </summary>
 public HomeController(IUserService userService, IGameService gameService = null, IAuthenticationManager authenticationManager = null)
 {
     serviceFactory = new CustomServicesFactory(userService, gameService, authenticationManager);
 }
Exemplo n.º 45
0
 public StoryOverviewQueryHandler(ISpmsContext db, IMapper mapper, IGameService gameService)
 {
     _db          = db;
     _mapper      = mapper;
     _gameService = gameService;
 }
Exemplo n.º 46
0
 public GameHub(IGameService gameService)
 {
     _gameService = gameService;
 }
Exemplo n.º 47
0
 public HomePage(IGameService gameService)
 {
     _gameService = gameService ?? throw new ArgumentNullException(nameof(gameService));
     InitializeComponent();
 }
Exemplo n.º 48
0
 public GameController(IGameService gameService, ILogger logger)
 {
     this.gameService = gameService;
     this.logger      = logger;
 }
 public GameServiceTests()
 {
     this.gameService = new GameService();
 }
Exemplo n.º 50
0
 public PlayController(IUnitOfWork unitOfWork, IMapper mapper, IGameService gameService, IPlayService playService)
     : base(unitOfWork, mapper)
 {
     this.gameService = gameService;
     this.playService = playService;
 }
Exemplo n.º 51
0
 public GameController(IGameService gameService)
 {
     this.gameService = gameService;
 }
Exemplo n.º 52
0
 public GetNewGameQueryHandler(IGameService gameService)
 {
     _gameService = gameService;
 }
Exemplo n.º 53
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ModHolderControlViewModel" /> class.
 /// </summary>
 /// <param name="gameDefinitionLoadProgressHandler">The game definition load progress handler.</param>
 /// <param name="gameIndexProgressHandler">The game index progress handler.</param>
 /// <param name="gameIndexService">The game index service.</param>
 /// <param name="promptNotificationsService">The prompt notifications service.</param>
 /// <param name="modListInstallRefreshRequestHandler">The mod list install refresh request handler.</param>
 /// <param name="modDefinitionInvalidReplaceHandler">The mod definition invalid replace handler.</param>
 /// <param name="idGenerator">The identifier generator.</param>
 /// <param name="shutDownState">State of the shut down.</param>
 /// <param name="modService">The mod service.</param>
 /// <param name="modPatchCollectionService">The mod patch collection service.</param>
 /// <param name="gameService">The game service.</param>
 /// <param name="notificationAction">The notification action.</param>
 /// <param name="appAction">The application action.</param>
 /// <param name="localizationManager">The localization manager.</param>
 /// <param name="installedModsControlViewModel">The installed mods control view model.</param>
 /// <param name="collectionModsControlViewModel">The collection mods control view model.</param>
 /// <param name="modDefinitionAnalyzeHandler">The mod definition analyze handler.</param>
 /// <param name="modDefinitionLoadHandler">The mod definition load handler.</param>
 /// <param name="modDefinitionPatchLoadHandler">The mod definition patch load handler.</param>
 /// <param name="gameDirectoryChangedHandler">The game directory changed handler.</param>
 /// <param name="logger">The logger.</param>
 public ModHolderControlViewModel(GameDefinitionLoadProgressHandler gameDefinitionLoadProgressHandler, GameIndexProgressHandler gameIndexProgressHandler,
                                  IGameIndexService gameIndexService, IPromptNotificationsService promptNotificationsService,
                                  ModListInstallRefreshRequestHandler modListInstallRefreshRequestHandler, ModDefinitionInvalidReplaceHandler modDefinitionInvalidReplaceHandler,
                                  IIDGenerator idGenerator, IShutDownState shutDownState, IModService modService, IModPatchCollectionService modPatchCollectionService, IGameService gameService,
                                  INotificationAction notificationAction, IAppAction appAction, ILocalizationManager localizationManager,
                                  InstalledModsControlViewModel installedModsControlViewModel, CollectionModsControlViewModel collectionModsControlViewModel,
                                  ModDefinitionAnalyzeHandler modDefinitionAnalyzeHandler, ModDefinitionLoadHandler modDefinitionLoadHandler, ModDefinitionPatchLoadHandler modDefinitionPatchLoadHandler,
                                  GameUserDirectoryChangedHandler gameDirectoryChangedHandler, ILogger logger)
 {
     // It was supposed to be a small project and I ended up with this mess I seriously need to introduce facades sometime
     this.promptNotificationsService         = promptNotificationsService;
     this.modDefinitionInvalidReplaceHandler = modDefinitionInvalidReplaceHandler;
     this.idGenerator               = idGenerator;
     this.shutDownState             = shutDownState;
     this.modService                = modService;
     this.modPatchCollectionService = modPatchCollectionService;
     this.notificationAction        = notificationAction;
     this.localizationManager       = localizationManager;
     this.gameService               = gameService;
     this.logger    = logger;
     this.appAction = appAction;
     this.modDefinitionLoadHandler            = modDefinitionLoadHandler;
     this.modDefinitionPatchLoadHandler       = modDefinitionPatchLoadHandler;
     this.modDefinitionAnalyzeHandler         = modDefinitionAnalyzeHandler;
     this.gameDirectoryChangedHandler         = gameDirectoryChangedHandler;
     this.modListInstallRefreshRequestHandler = modListInstallRefreshRequestHandler;
     this.gameIndexService                  = gameIndexService;
     this.gameIndexProgressHandler          = gameIndexProgressHandler;
     this.gameDefinitionLoadProgressHandler = gameDefinitionLoadProgressHandler;
     InstalledMods  = installedModsControlViewModel;
     CollectionMods = collectionModsControlViewModel;
     if (StaticResources.CommandLineOptions != null && StaticResources.CommandLineOptions.EnableResumeGameButton)
     {
         forceEnableResumeButton = true;
     }
 }
Exemplo n.º 54
0
 public GameController(IGameService service,
                       IHubContext <MainHub, IMainHub> mainHub)
 {
     _service    = service;
     _hubContext = mainHub;
 }
Exemplo n.º 55
0
 public GameCleanupJob(ILifetimeScope scope)
     : base(scope)
 {
     this.gameService = this.LifetimeScope.Resolve <IGameService>();
 }
Exemplo n.º 56
0
 public FilterController(IGameService gameService, IFilterService filterService)
 {
     _gameService   = gameService;
     _filterService = filterService;
 }
Exemplo n.º 57
0
    private void DisplayQuestFailed()
    {
        this.WriteSummaryDescription();
        int       failedStepRank = (this.guiNotification as GuiNotificationQuestFailed).FailedStepRank;
        QuestStep step;

        if (failedStepRank >= 0 && failedStepRank < this.Quest.QuestDefinition.Steps.Length)
        {
            step = this.Quest.QuestDefinition.Steps[failedStepRank];
        }
        else
        {
            step = null;
        }
        Diagnostics.Assert(failedStepRank != -1, "There wasn't any step in progress when the quest failed");
        this.LeftTitleLabel.Text = "%NotificationQuestFailedObjectiveTitle";
        this.LeftSummary.Hide();
        this.LeftStepItem.Show(this.Quest, step, failedStepRank, this.empire);
        string arg = this.Quest.QuestDefinition.Name;

        if (this.questGuiElement != null)
        {
            arg = AgeLocalizer.Instance.LocalizeString(this.questGuiElement.Title);
        }
        string text = string.Empty;
        bool   flag = false;

        if (this.Quest.QuestDefinition.IsGlobal && this.Quest.QuestDefinition.GlobalWinner == GlobalQuestWinner.First && this.Quest.QuestState == QuestState.Failed)
        {
            flag = true;
            QuestRegisterVariable questRegisterVariable = null;
            if (this.Quest.QuestVariables.TryGetValue(QuestDefinition.WinnerVariableName, out questRegisterVariable) && questRegisterVariable != null)
            {
                if (this.game == null)
                {
                    IGameService service = Services.GetService <IGameService>();
                    Diagnostics.Assert(service != null && service.Game != null && service.Game is global::Game);
                    this.game = (service.Game as global::Game);
                }
                int value = questRegisterVariable.Value;
                if (this.departmentOfForeignAffairs.GetDiplomaticRelation(this.game.Empires[value]).State.Name == DiplomaticRelationState.Names.Unknown)
                {
                    text = AgeLocalizer.Instance.LocalizeString("%UnknownEmpire");
                }
                else
                {
                    text = new GuiEmpire(this.game.Empires[value]).GetColorizedLocalizedNameAndFaction(this.empire, false);
                }
            }
        }
        string text2;

        if (flag)
        {
            text2 = string.Format(AgeLocalizer.Instance.LocalizeString("%NotificationQuestFailedCompetitiveDescription"), arg);
            if (!string.IsNullOrEmpty(text.Trim()))
            {
                text2 = text2 + "\n" + string.Format(AgeLocalizer.Instance.LocalizeString("%NotificationQuestFailedCompetitiveWinnerDescription"), text);
            }
        }
        else
        {
            text2 = string.Format(AgeLocalizer.Instance.LocalizeString("%NotificationQuestFailedDescription"), arg);
        }
        this.RightSummary.Show(this.Quest, "%QuestOutcomeTitle", text2);
        this.RightStepItem.Hide();
    }
Exemplo n.º 58
0
 public HashGameController(IGameService gameService, IPlayerService playerService)
 {
     _gameService   = gameService;
     _playerService = playerService;
 }
Exemplo n.º 59
0
 public ChartController(IGameService gameService)
 {
     this._gameService = gameService;
 }
Exemplo n.º 60
0
 public HistoryController(IHistoryService historyService, IGameService gameService)
 {
     _historyService = historyService;
     _gameService    = gameService;
 }