Пример #1
0
        public void ImportTeam(string text)
        {
            var t = new TeamVM(UserData.ImportTeam(text));

            TeamVM.New = t;
            _teams.Insert(1, t);
        }
Пример #2
0
        public void NewTeam()
        {
            var t = new TeamVM(new PokemonTeam());

            TeamVM.New = t;
            _teams.Insert(1, t);
        }
Пример #3
0
 private void OnLoaded(object sender, RoutedEventArgs e)
 {
     ViewModel = DataContext as TeamVM;
     if (TeamVM.New == ViewModel && ViewModel != null)
     {
         BeginEdit();
     }
 }
Пример #4
0
 public PokemonVM(TeamVM container, int index)
 {
     _container = container;
     _index     = index;
     if (Model != null)
     {
         Model.PropertyChanged    += Model_PropertyChanged;
         Model.Ev.PropertyChanged += Model_PropertyChanged;
         ((ObservableCollection <LearnedMove>)Model.Moves).CollectionChanged += PokemonVM_CollectionChanged;
     }
 }