Exemplo n.º 1
0
        public ArenaLayoutViewModel(IArenaViewModel arena, PlayerStatusTypeViewModel playerStatus, AttributeValueCollection attributes, ArenaGridColumnCollection dataGridInfo)
        {
            _arena       = arena;
            PlayerStatus = playerStatus;

            Attributes        = attributes;
            DataGridInfo      = dataGridInfo;
            _games            = new ArenaGameCollectionViewModel(this);
            _filters          = new ArenaFilterCollectionViewModel(this);
            _alsoPlayingGames = new AlsoPlayingGamesCollection();

            _arena.PropertyChanged += Arena_PropertyChanged;
        }
Exemplo n.º 2
0
        public ArenaGameViewModel(AvailableGameViewModel availableGame, ArenaGameCollectionViewModel parentCollection)
        {
            if (availableGame == null)
            {
                throw new ArgumentNullException(nameof(availableGame));
            }

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

            _availableGame    = availableGame;
            _parentCollection = parentCollection;
            _parentCollection.CollectionChanged += ParentCollection_CollectionChanged;
            _availableGame.PropertyChanged      += AvailableGame_PropertyChanged;
        }