コード例 #1
0
 public AdminController(IGameService gameService, IHoleService holeService, IPlayerService playerService, IRankingService rankingService)
 {
     _gameService = gameService;
     _holeService = holeService;
     _playerService = playerService;
     _rankingService = rankingService;
 }
コード例 #2
0
ファイル: GameViewModel.cs プロジェクト: kacperj/ITBEGitTest
        public GameViewModel(IGameService gameService)
        {
            this.gameService = gameService;

            this.StageDownCommand = new DelegateCommand(StageDown, CanStageDown);
            this.StageUpCommand = new DelegateCommand(StageUp, CanStageUp);
        }
コード例 #3
0
 public GameController(IGameService gameService, IHoleService holeService, IPlayerService playerService, IShotTypeService scoreTypeService)
 {
     _gameService = gameService;
     _holeService = holeService;
     _playerService = playerService;
     _scoreTypeService = scoreTypeService;
 }
コード例 #4
0
ファイル: GameController.cs プロジェクト: jtse97/HockeyLeague
        //
        // GET: /Game/
         
        public GameController(IGameService gameService)
        {
            //IGameService gameService = new GameService(new GameRepository(), new TeamRepository());

            _gameService = gameService;
            _gameMapper = new GameMapper();
        }
コード例 #5
0
        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);
        }
コード例 #6
0
ファイル: AdminController.cs プロジェクト: JeauxCom/Cojac
 public AdminController(IRoundService roundService, ISeriesService seriesService, ITeamService teamService, IGameService gameService)
 {
     _seriesService = seriesService;
     _roundService  = roundService;
     _teamService   = teamService;
     _gameService   = gameService;
 }
コード例 #7
0
 /// <summary>
 /// Initialize objects
 /// </summary>
 public TrophiesPage()
 {
     InitializeComponent();
     _svc = new GameService();
     InitializeInformation("");
     CloseButton.Click += new RoutedEventHandler(CloseButton_Click);
 }
コード例 #8
0
ファイル: GameController.cs プロジェクト: NameIsBad/BoredNew
 public GameController(IGameService game, IReportService reportService, IGameCommentService gameComment, IConfigInfoService configInfoService)
 {
     _game = game;
     _reportService = reportService;
     _gameComment = gameComment;
     _configInfoService = configInfoService;
 }
コード例 #9
0
 public LadderService(IUnitOfWork unitOfWork, IGameService gameService, IMapTemplateProvider mapTemplateProvider, IEventAggregator eventAggregator)
 {
     this.unitOfWork = unitOfWork;
     this.gameService = gameService;
     this.mapTemplateProvider = mapTemplateProvider;
     this.eventAggregator = eventAggregator;
 }
コード例 #10
0
 public void registerService(IGameService gameService)
 {
     services.Add(gameService);
     foreach (Entity entity in entities.Values)
     {
         gameService.registerEntityIfNeeded(entity);
     }
 }
コード例 #11
0
ファイル: GameUI.cs プロジェクト: pmbanugo/TikTak
        public GameUI(IGameService gameservice, IController controller)
        {
            InitializeComponent();

            this.gameService = gameservice;
            this.controller = controller;
            SubscribeToGameEvents();
        }
コード例 #12
0
        public EventController(IEventService eventService
			, IExcelService excelService
			, IGameService gameService)
        {
            _eventService = eventService;
            _excelService = excelService;
            _gameService = gameService;
        }
コード例 #13
0
 public GameController(IGameService gameService, IShotService shotService, IHoleService holeService, IPlayerService playerService, IRankingService rankingService)
 {
     _gameService = gameService;
     _shotService = shotService;
     _holeService = holeService;
     _playerService = playerService;
     _rankingService = rankingService;
 }
コード例 #14
0
        public TeamController(ITeamService teamService
			, IExcelService excelService
			, IGameService gameService)
        {
            _teamService = teamService;
            _excelService = excelService;
            _gameService = gameService;
        }
コード例 #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;
        }
コード例 #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;
        }
コード例 #17
0
ファイル: GameControllerTest.cs プロジェクト: pmbanugo/TikTak
 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);
 }
コード例 #18
0
 public TournamentService(
     IUnitOfWork unitOfWork, 
     IGameService gameService, 
     IMapTemplateProvider mapTemplateProvider)
 {
     this.unitOfWork = unitOfWork;
     this.gameService = gameService;
     this.mapTemplateProvider = mapTemplateProvider;
 }
コード例 #19
0
        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;
        }
コード例 #20
0
ファイル: BaseServiceTests.cs プロジェクト: emactaggart/CS476
 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);
 }
コード例 #21
0
        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>>();
        }
コード例 #22
0
        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;
        }
コード例 #23
0
        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;
        }
コード例 #24
0
ファイル: TestController.cs プロジェクト: NameIsBad/wuliao
 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;
 }
コード例 #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));
        }
コード例 #26
0
ファイル: Program.cs プロジェクト: ilkerde/pipemania
        /// <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;
        }
コード例 #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;
        }
コード例 #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 ));
 }
コード例 #29
0
        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;
        }
コード例 #30
0
 public HomeViewModel(
     IGameService gameService)
 {
     _gameService = gameService;
 }
コード例 #31
0
ファイル: GameCount.cs プロジェクト: Lazoror/GameStore
 public GameCount(IGameService gameService)
 {
     _gameService = gameService;
 }
コード例 #32
0
 public GameController(IGameService gameService)
 {
     _gameService = gameService;
 }
コード例 #33
0
 public GameSessionsHub(IGameService gameService, IGameSessionService gameSessionService, IMapper mapper)
 {
     this.gameService        = gameService;
     this.gameSessionService = gameSessionService;
     this.mapper             = mapper;
 }
コード例 #34
0
 /// <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;
 }
コード例 #35
0
 public CommentController(ICommentService commentService, IGameService gameService)
 {
     _commentService = commentService;
     _gameService    = gameService;
 }
コード例 #36
0
 /// <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;
 }
コード例 #37
0
 //  3 DI
 public MainPageController(IGameService service, IMapper _mapper)
 {
     gameService = service;
     mapper      = _mapper;
 }
コード例 #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;
 }
コード例 #39
0
 public CallOnTableViewComponent(IGameService gameService)
 {
     _gameService = gameService;
 }
コード例 #40
0
ファイル: DropTokenController.cs プロジェクト: sychoi3/9dt
 public DropTokenController(IGameService service, IMapper mapper, ILogger <DropTokenController> logger)
 {
     _service = service;
     _mapper  = mapper;
     _logger  = logger;
 }
コード例 #41
0
 public ItemService(IMapper mapper, ISessionService sessionService, IGameService gameService, IItemRepository itemRepository)
     : base(mapper, sessionService, gameService, itemRepository)
 {
 }
コード例 #42
0
 public GameController(ILogger <GameController> logger, IGameService gameService)
 {
     _logger      = logger;
     _gameService = gameService;
 }
コード例 #43
0
 public ReportController(IReportService reportService, IMapper mapper, IGameService gameService)
 {
     this.reportService = reportService;
     this.mapper        = mapper;
     this.gameService   = gameService;
 }
コード例 #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);
 }
コード例 #45
0
 public StoryOverviewQueryHandler(ISpmsContext db, IMapper mapper, IGameService gameService)
 {
     _db          = db;
     _mapper      = mapper;
     _gameService = gameService;
 }
コード例 #46
0
 public GameHub(IGameService gameService)
 {
     _gameService = gameService;
 }
コード例 #47
0
 public HomePage(IGameService gameService)
 {
     _gameService = gameService ?? throw new ArgumentNullException(nameof(gameService));
     InitializeComponent();
 }
コード例 #48
0
 public GameController(IGameService gameService, ILogger logger)
 {
     this.gameService = gameService;
     this.logger      = logger;
 }
コード例 #49
0
 public GameServiceTests()
 {
     this.gameService = new GameService();
 }
コード例 #50
0
 public PlayController(IUnitOfWork unitOfWork, IMapper mapper, IGameService gameService, IPlayService playService)
     : base(unitOfWork, mapper)
 {
     this.gameService = gameService;
     this.playService = playService;
 }
コード例 #51
0
 public GameController(IGameService gameService)
 {
     this.gameService = gameService;
 }
コード例 #52
0
 public GetNewGameQueryHandler(IGameService gameService)
 {
     _gameService = gameService;
 }
コード例 #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;
     }
 }
コード例 #54
0
 public GameController(IGameService service,
                       IHubContext <MainHub, IMainHub> mainHub)
 {
     _service    = service;
     _hubContext = mainHub;
 }
コード例 #55
0
 public GameCleanupJob(ILifetimeScope scope)
     : base(scope)
 {
     this.gameService = this.LifetimeScope.Resolve <IGameService>();
 }
コード例 #56
0
ファイル: FilterController.cs プロジェクト: blastt/playerup
 public FilterController(IGameService gameService, IFilterService filterService)
 {
     _gameService   = gameService;
     _filterService = filterService;
 }
コード例 #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();
    }
コード例 #58
0
 public HashGameController(IGameService gameService, IPlayerService playerService)
 {
     _gameService   = gameService;
     _playerService = playerService;
 }
コード例 #59
0
ファイル: ChartController.cs プロジェクト: pmpm/typ2012
 public ChartController(IGameService gameService)
 {
     this._gameService = gameService;
 }
コード例 #60
0
 public HistoryController(IHistoryService historyService, IGameService gameService)
 {
     _historyService = historyService;
     _gameService    = gameService;
 }