private void AddCreature(CreatureVM obj) { CreatureCollectionAccess.Add(obj); Model.Creatures.Add(obj.Model); RemoveCreatureCommand.OnCanExecuteChanged(); ClearCreaturesCommand.OnCanExecuteChanged(); }
private void ClearCreatures(CreatureVM obj) { CreatureCollectionAccess.Clear(); Model.Creatures.Clear(); RemoveCreatureCommand.OnCanExecuteChanged(); ClearCreaturesCommand.OnCanExecuteChanged(); }
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(); }