Esempio n. 1
0
        public void AddOrUpdate(PokemonData egg, IncubatorViewModel incu = null)
        {
            var eggModel = new EggViewModel(egg)
            {
                Hatchable = incu == null
            };
            var existing = Eggs.FirstOrDefault(x => x.Id == eggModel.Id);

            if (existing != null)
            {
                // Do not update, it overwrites OnEggIncubatorStatus Status updates
                // existing.UpdateWith(eggModel);
            }
            else
            {
                Eggs.Add(eggModel);
            }
        }
Esempio n. 2
0
 public void UpdateWith(EggViewModel e)
 {
     KM = e.KM;
     RaisePropertyChanged("KM");
 }