예제 #1
0
 private void AddCreature(CreatureVM obj)
 {
     CreatureCollectionAccess.Add(obj);
     Model.Creatures.Add(obj.Model);
     RemoveCreatureCommand.OnCanExecuteChanged();
     ClearCreaturesCommand.OnCanExecuteChanged();
 }
예제 #2
0
 private void ClearCreatures(CreatureVM obj)
 {
     CreatureCollectionAccess.Clear();
     Model.Creatures.Clear();
     RemoveCreatureCommand.OnCanExecuteChanged();
     ClearCreaturesCommand.OnCanExecuteChanged();
 }
예제 #3
0
 public void Load()
 {
     Model.LoadEntities();
     CreatureCollectionAccess.AddRange(Model.Creatures.Select(c => new CreatureVM(c)));
     EnvironmentCollectionAccess.AddRange(Model.Environments.Select(e => new EnvironmentVM(e)));
     AddCreatureCommand.OnCanExecuteChanged();
     RemoveCreatureCommand.OnCanExecuteChanged();
     ClearCreaturesCommand.OnCanExecuteChanged();
     AddEnvironmentCommand.OnCanExecuteChanged();
     RemoveEnvironmentCommand.OnCanExecuteChanged();
     ClearEnvironmentsCommand.OnCanExecuteChanged();
 }