Exemple #1
0
 public MainViewModel()
 {
     SetViewModel         = new SetsViewModel();
     PokemonsViewModel    = new PokemonsViewModel(SetViewModel.Sets);
     EnergyCardsViewModel = new EnergyCardsViewModel(SetViewModel.Sets);
     TrainerCardViewModel = new TrainerCardsViewModel(SetViewModel.Sets);
     FormatViewModel      = new FormatsViewModel(this, SetViewModel.Sets);
 }
Exemple #2
0
        public async Task Save()
        {
            Directory.CreateDirectory("Data");
            await SetViewModel.Save();

            await PokemonsViewModel.Save();

            await energyCardsViewModel.Save();

            await trainerCardsViewModel.Save();

            await formatViewModel.Save();
        }
Exemple #3
0
        public async Task Load()
        {
            if (!Directory.Exists("Data"))
            {
                return;
            }

            await SetViewModel.LoadSets();

            await PokemonsViewModel.Load();

            await energyCardsViewModel.Load();

            await trainerCardsViewModel.Load();

            await formatViewModel.Load();
        }