예제 #1
0
        public BlankPage1()
        {
            this.InitializeComponent();
            var accountStorage     = MainPage.GlobalSettings.Storages.AccountStorage;
            var categoryStorage    = MainPage.GlobalSettings.Storages.CategoryStorage;
            var transactionStorage = MainPage.GlobalSettings.Storages.TransactionStorage;
            var model = new Report1ViewModel(accountStorage, categoryStorage, transactionStorage);

            model.Execute();
            ViewModel = model;
        }
예제 #2
0
        public void TestConstructor()
        {
            var viewModel = new Report1ViewModel(accountStorage, categoryStorage, transactionStorage);

            var counts = viewModel.Accounts.Count;

            viewModel.Account = viewModel.Accounts.FirstOrDefault();
            viewModel.Execute();

            Assert.AreEqual(2, counts);
        }
예제 #3
0
 private void Selector_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     ViewModel.Execute();
 }