コード例 #1
0
        public ViewModelLocator()
        {
            //Initialsing Model ViewModel
            RootViewModel = new RootViewModel();


            // Initialising Window View Models
            MainWindowVM = new MainWindowViewModel(RootViewModel);
            //NewClientWindowVM = new NewClientWindowViewModel(RootVM);
            CardOverViewWindowVM             = new CardOverViewWindowViewModel(RootViewModel);
            LineGraphVM                      = new LineGraphViewModel();
            StatisticsWindowVM               = new StatisticsWindowViewModel(RootViewModel, LineGraphVM);
            StatisticsTopicSelectionWindowVM = new StatisticsTopicSelectionWindowViewModel(RootViewModel, StatisticsWindowVM);
            LearningCardWindowVM             = new LearningCardWindowViewModel(MainWindowVM);
            PrintWindowVM                    = new PrintWindowViewModel(RootViewModel);
            NewCardWindowVM                  = new NewCardWindowViewModel(MainWindowVM);
            NewTopicWindowVM                 = new NewTopicWindowViewModel(RootViewModel);
        }
コード例 #2
0
        private void LoadTransactions(SupportedTransactionTypes transactionsType)
        {
            var transactionsFilePath = GetTransactionsFilePath();

            if (string.IsNullOrWhiteSpace(transactionsFilePath))
            {
                return;
            }

            var transactions           = _transactionsManager.CreateTransactionsFromFile(transactionsFilePath, transactionsType);
            var observableTransactions = new ObservableCollection <ITransaction>(transactions);

            Transactions = observableTransactions;

            LineGraphViewModel        = new LineGraphViewModel(Transactions);
            QuickInfoPageViewModel    = new QuickInfoPageViewModel(Transactions);
            TransactionsListViewModel = new TransactionsListViewModel(Transactions);
            PieChartViewModel         = new PieChartViewModel(Transactions);
        }