Exemplo n.º 1
0
        public void InitView()
        {
            _cardPreviewVm = new CardPreviewVm();
            _cardPictureVm = new CardPictureVm();
            _abilityTypeVm = new AbilityTypeVm();
            _externQueryVm = new CardQueryExVm();
            _cardQueryVm   = new CardQueryVm(_abilityTypeVm, _externQueryVm, _cardPreviewVm, _cardPictureVm);

            AbilityTypeView.DataContext = _abilityTypeVm;
            ExternQueryView.DataContext = _externQueryVm;
            CardPreviewView.DataContext = _cardPreviewVm;
            CardPictureView.DataContext = _cardPictureVm;
            CardEditorView.DataContext  = _cardQueryVm;
        }
Exemplo n.º 2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            _deckVm          = new DeckVm();
            _playerVm        = new PlayerVm();
            _deckStatsVm     = new DeckStatsVm();
            _cardPreviewVm   = new CardPreviewVm();
            _cardPictureVm   = new CardPictureVm();
            _cardQueryVm     = new CardQueryVm(_cardPreviewVm);
            _cardDetailVm    = new CardDetailVm(_cardPictureVm);
            _deckOrderVm     = new DeckOrderVm(_deckVm);
            _deckOperationVm = new DeckOperationVm(_deckVm, _playerVm, _deckStatsVm);


            DeckView.DataContext          = _deckVm;
            PlayerView.DataContext        = _playerVm;
            DeckStatsView.DataContext     = _deckStatsVm;
            CardPreviewView.DataContext   = _cardPreviewVm;
            CardPictureView.DataContext   = _cardPictureVm;
            CardQueryView.DataContext     = _cardQueryVm;
            CardDetailView.DataContext    = _cardDetailVm;
            DeckOrderView.DataContext     = _deckOrderVm;
            DeckOperationView.DataContext = _deckOperationVm;
        }