public ChartsViewModel( IEventAggregator events, Func <HearthStatsDbContext> dbContext, IRepository <GameResult> gameRepository, IRepository <ArenaSession> arenaRepository, IDeckManager deckManager, [ImportMany] IEnumerable <IChartTab> chartTabs) { this.events = events; this.dbContext = dbContext; this.gameRepository = gameRepository; this.arenaRepository = arenaRepository; this.deckManager = deckManager; this.Order = 4; this.DisplayName = "Charts"; this.Busy = new BusyWatcher(); this.servers.Insert(0, new ServerItemModel("")); Items.AddRange(chartTabs.OrderBy(x => x.Order)); ActivateItem(Items.FirstOrDefault()); this.dateFilter.From = DateTime.Now.AddMonths(-1).SetToBeginOfDay(); this.dateFilter.DateChanged += this.DateFilterOnPropertyChanged; this.PropertyChanged += this.OnPropertyChanged; }
public EditGameFlyoutViewModel( IDialogManager dialogManager, IEventAggregator events, IRepository <ArenaSession> arenaRepository, IRepository <GameResult> gameRepository, IDeckManager deckManager, GameManager.GameManager gameManager) { this.dialogManager = dialogManager; this.events = events; this.arenaRepository = arenaRepository; this.gameRepository = gameRepository; this.deckManager = deckManager; this.gameManager = gameManager; Name = Flyouts.EditGame; Header = displayName_new; SetPosition(Position.Right); heroes = new BindableCollection <Hero>(); events.Subscribe(this); GameMode = GameMode.Practice; StartTime = DateTime.Now; EndTime = DateTime.Now; PropertyChanged += OnPropertyChanged; lastIsOpen = IsOpen; // yeah lol :p gameModes.Remove(GameMode.Arena); selectedServer = servers.Default; Busy = new BusyWatcher(); }
public DeckSettingsViewModel( IEventAggregator events, IDeckManager deckManager) { this.events = events; this.deckManager = deckManager; SetPosition(Position.Left); Name = Flyouts.Decks; Header = DisplayName = "Decks:"; // note the setting of backing field instead of property, to not trigger deck refreshing yet. selectedServer = servers.Default ?? servers.First(); events.Subscribe(this); CanTakeScreenshot = true; }
public BalloonSettingsViewModel( IEventAggregator events, Func <HearthStatsDbContext> dbContext, UserPreferences userPreferences, BalloonSettings balloonSettings, IDeckManager deckManager) { this.events = events; this.dbContext = dbContext; this.userPreferences = userPreferences; this.balloonSettings = balloonSettings; this.deckManager = deckManager; this.DisplayName = "Tray icon settings:"; this.Order = 1; events.Subscribe(this); }
public GameManagers(IGameManager gameManager, IActivateCardManager activateCardManager, IBarsPlayerManager barsPlayerManager, IBarsEnemyManager barsEnemyManager, IEnemyManager enemyManager, IAlliesManager alliesManager, IPlayersManager playersManager, IDeckManager deckManager, IInventoryManager inventoryManager, ITargetManager targetManager, ITokenRewardManager tokenRewardManager) { GameManager = gameManager; ActivateCardManager = activateCardManager; BarsPlayerManager = barsPlayerManager; BarsEnemyManager = barsEnemyManager; EnemyManager = enemyManager; AlliesManager = alliesManager; PlayersManager = playersManager; DeckManager = deckManager; InventoryManager = inventoryManager; TargetManager = targetManager; TokenRewardManager = tokenRewardManager; }
private void SetDependecies(ILogicManager logicManager) { _popupManagers = logicManager.PopupManagers; _tokenRewardManager = logicManager.GameManagers.TokenRewardManager; _saveManager = logicManager.BaseManagers.SaveManager; _animaManager = logicManager.BaseManagers.AnimaManager; _objectStorage = logicManager.BaseManagers.ObjectStorage; _publisher = logicManager.BaseManagers.Publisher; _gameManager = logicManager.GameManagers.GameManager; _coroutiner = logicManager.BaseManagers.Coroutiner; _deckManager = logicManager.GameManagers.DeckManager; _targetManager = logicManager.GameManagers.TargetManager; _enemyManager = logicManager.GameManagers.EnemyManager; _alliesManager = logicManager.GameManagers.AlliesManager; _configurateManager = logicManager.BaseManagers.ConfigurateManager; _audioManager = logicManager.BaseManagers.AudioManager; _activateCardManager = logicManager.GameManagers.ActivateCardManager; _publisher.AddSubscriber(this); }
public LatestGamesViewModel(IEventAggregator events, IRepository <GameResult> gameRepository, IDeckManager deckManager, Func <HearthStatsDbContext> dbContext, GameManager gameManager) { IsNotifying = false; this.events = events; this.gameRepository = gameRepository; this.deckManager = deckManager; this.dbContext = dbContext; this.gameManager = gameManager; this.Order = 1; this.DisplayName = "Games"; this.events.Subscribe(this); this.totals = new GameResultTotalsModel(); gameResultsCV = CollectionViewSource.GetDefaultView(this.gameResults); gameResultsCV.SortDescriptions.Add(new SortDescription("Started", ListSortDirection.Descending)); servers.Insert(0, new ServerItemModel("")); dateFilter.From = DateTime.Now.AddMonths(-1).SetToBeginOfDay(); Busy = new BusyWatcher(); dateFilter.DateChanged += DateFilterOnPropertyChanged; this.PropertyChanged += this.OnPropertyChanged; }
public CurrentGameFlyoutViewModel( IEventAggregator events, IRepository <GameResult> gameRepository, IRepository <ArenaSession> arenaRepository, IDeckManager deckManager, GameManager.GameManager gameManager) { this.events = events; this.gameRepository = gameRepository; this.arenaRepository = arenaRepository; this.deckManager = deckManager; this.gameManager = gameManager; Name = Flyouts.CurrentGame; Header = "Current Game:"; SetPosition(Position.Right); heroes = new BindableCollection <Hero>(); events.Subscribe(this); GameMode = GameMode.Practice; StartTime = DateTime.Now; GoFirst = true; dateFilter.From = DateTime.Now.AddMonths(-1).SetToBeginOfDay(); dateFilter.DateChanged += (sender, args) => RefreshStats(); }
public DecksStatViewModel(IEventAggregator events, IRepository <GameResult> gameRepository, IDeckManager deckManager) { this.gameRepository = gameRepository; this.deckManager = deckManager; events.Subscribe(this); }
public StatusViewModel(IEventAggregator events, IDeckManager deckManager) { this.events = events; this.deckManager = deckManager; events.Subscribe(this); }
public CardsController(IDeckManager manager, IDeckRepository deckRepository, ICardRepository cardRepository) { this.manager = manager; this.deckRepository = deckRepository; this.cardRepository = cardRepository; }
void Start() { _publisher = new Publisher(); _saveManager = new SaveManager(); _animaManager = new AnimaManager(); _objectLoader = new ObjectLoader(); _configurateManager = new ConfigurateManager(); _objectStorage = new ObjectStorage(_objectLoader,_configurateManager); _tokenRewardManager = new TokenRewardManager(_publisher, _animaManager, _objectStorage,_configurateManager); _audioManager = new AudioManager(_objectStorage, _coroutiner); _barsPlayerManager = new BarsPlayerManager(_objectStorage); _inventoryManager = new InventoryManager(_objectStorage, _publisher, _coroutiner,_configurateManager); _gameStageManager = new GameStageManager(_publisher, _coroutiner); _gameManager = new GameManager(_publisher, _animaManager, _objectStorage, _coroutiner,_inventoryManager,_configurateManager); _enemyManager = new EnemyManager(_publisher, _coroutiner,_animaManager,_objectStorage, _configurateManager); _alliesManager = new AlliesManager(_coroutiner, _configurateManager); _playersManager = new PlayersManager(_publisher,_animaManager, _tokenRewardManager); _barsEnemyManager = new BarsEnemyManager(_enemyManager, _publisher); _activateCardManager = new ActivateCardManager(_publisher, _barsPlayerManager,_enemyManager); _targetManager = new TargetManager(_publisher, _animaManager, _activateCardManager, _enemyManager); _deckManager = new DeckManager(_objectStorage,_inventoryManager,_animaManager,_publisher,_coroutiner, _targetManager,_configurateManager); _popupEvent = new PopupEvent(_objectStorage,_publisher,_animaManager,_coroutiner, _configurateManager); _popupGameMenu = new PopupGameMenu(_objectStorage, _publisher, _animaManager,_coroutiner); _popupInventory = new PopupInventory(_inventoryManager, _animaManager); _popupPlaceInSlot = new PopupPlaceInSlot(_publisher); _popupPlayers = new PopupPlayers(_animaManager, _objectStorage, _publisher, _configurateManager); //_descriptionCardPopup = new PopupDescriptionCard(_popupDescriptionCard); _popupDescriptionCard = new PopupDescriptionCard(_coroutiner,_animaManager); _popupRewardEvent = new PopupRewardEvent(_publisher, _objectStorage, _configurateManager, _coroutiner); _publisher.AddSubscriber((ISubscriber) _gameManager); _publisher.AddSubscriber((ISubscriber) _inventoryManager); _publisher.AddSubscriber((ISubscriber) _gameStageManager); _publisher.AddSubscriber((ISubscriber) _activateCardManager); _publisher.AddSubscriber((ISubscriber) _barsPlayerManager); _publisher.AddSubscriber((ISubscriber) _barsEnemyManager); _publisher.AddSubscriber((ISubscriber) _enemyManager); _publisher.AddSubscriber((ISubscriber) _alliesManager); _publisher.AddSubscriber((ISubscriber) _playersManager); _publisher.AddSubscriber((ISubscriber) _deckManager); _publisher.AddSubscriber((ISubscriber) _targetManager); _publisher.AddSubscriber((ISubscriber) _audioManager); _publisher.AddSubscriber((ISubscriber) _tokenRewardManager); _publisher.AddSubscriber((ISubscriber) _popupGameMenu); _publisher.AddSubscriber((ISubscriber) _popupInventory); _publisher.AddSubscriber((ISubscriber) _popupEvent); _publisher.AddSubscriber((ISubscriber) _popupPlayers); _publisher.AddSubscriber((ISubscriber) _popupDescriptionCard); _publisher.AddSubscriber((ISubscriber) _popupRewardEvent); _publisher.AddSubscriber((ISubscriber) _popupPlaceInSlot); _baseManagers = new BaseManagers(_saveManager,_animaManager,_publisher,_objectStorage,_configurateManager,_coroutiner, _audioManager); _gameManagers = new GameManagers(_gameManager, _activateCardManager, _barsPlayerManager, _barsEnemyManager, _enemyManager, _alliesManager, _playersManager, _deckManager, _inventoryManager, _targetManager, _tokenRewardManager); _popupManagers = new PopupManagers(_popupGameMenu,_popupInventory, _popupEvent, _popupPlayers, _popupDescriptionCard,_popupPlaceInSlot, _popupRewardEvent); _logicManager = new LogicManager(_baseManagers,_gameManagers, _popupManagers); _loadManager = new LoadManager(_logicManager); //-------------------Делаем переход в сцену "Меню" _loadManager.Navigate(SceneTypeEnum.Bootstrapper, SceneTypeEnum.Menu, CustomObject.Empty); }
public DecksStatViewModel(IEventAggregator events, IRepository<GameResult> gameRepository, IDeckManager deckManager) { this.gameRepository = gameRepository; this.deckManager = deckManager; events.Subscribe(this); }
public DecksController(IDeckManager manager, IDeckRepository deckRepository) { this.manager = manager; this.deckRepository = deckRepository; }