/// <summary> /// Pull prototype data to view model. /// </summary> private async Task Pull() { var effectRows = await _data.GetAll <EffectProtModel>(); effectRows.Add(new EffectProtModel()); Effects = new BindableCollection <EffectProtModel>(effectRows); var armourRows = await _data.GetAll <ArmourProtModel>(); Armours = new BindableCollection <ArmourProtDisplay>(_mapper.Map <List <ArmourProtDisplay> >(armourRows)); foreach (var armour in Armours) { if (armour.Effect != null) { foreach (var effect in Effects) { if (effect.EffectType == armour.Effect.EffectType) { armour.Effect = effect; break; } } } } }
/// <summary> /// Pull prototype data to view model. /// </summary> private async Task Pull() { var effectRows = await _data.GetAll <EffectProtModel>(); effectRows.Add(new EffectProtModel()); Effects = new BindableCollection <EffectProtModel>(effectRows); var weaponRows = await _data.GetAll <WeaponProtModel>(); Weapons = new BindableCollection <WeaponProtDisplay>(_mapper.Map <List <WeaponProtDisplay> >(weaponRows)); foreach (var weapon in Weapons) { if (weapon.Effect != null) { foreach (var effect in Effects) { if (effect.EffectType == weapon.Effect.EffectType) { weapon.Effect = effect; break; } } } } }
/// <summary> /// Pull prototype data to view model. /// </summary> private async Task Pull() { var armourRows = await _data.GetAll <ArmourProtModel>(); armourRows.Add(new ArmourProtModel()); Armours = new BindableCollection <ArmourProtModel>(armourRows); var weaponRows = await _data.GetAll <WeaponProtModel>(); weaponRows.Add(new WeaponProtModel()); Weapons = new BindableCollection <WeaponProtModel>(weaponRows); var enemyRows = await _data.GetAll <EnemyProtModel>(); Enemies = new BindableCollection <EnemyProtDisplay>(_mapper.Map <List <EnemyProtDisplay> >(enemyRows)); foreach (var enemy in Enemies) { if (enemy.Armour != null) { foreach (var armour in Armours) { if (armour.ArmourType == enemy.Armour.ArmourType) { enemy.Armour = armour; break; } } } if (enemy.Weapon != null) { foreach (var weapon in Weapons) { if (weapon.WeaponType == enemy.Weapon.WeaponType) { enemy.Weapon = weapon; break; } } } } }
/// <summary> /// Pull prototype data to view model. /// </summary> private async Task Pull() { var roomRows = await _data.GetAll <RoomProtModel>(); Rooms = new BindableCollection <RoomProtDisplay>(_mapper.Map <List <RoomProtDisplay> >(roomRows)); }
/// <summary> /// Pull prototype data to view model. /// </summary> private async Task Pull() { var effectRows = await _data.GetAll <EffectProtModel>(); Effects = new BindableCollection <EffectProtDisplay>(_mapper.Map <List <EffectProtDisplay> >(effectRows)); }