Ejemplo n.º 1
0
        private void ExecuteAddWeapon()
        {
            AddWeaponWindowViewModel addWeaponWindowViewModel = new AddWeaponWindowViewModel();

            Model.Weapon weapon = addWeaponWindowViewModel.GetWeapon();
            if (weapon != null)
            {
                Weapons.Add(weapon);
            }
        }
Ejemplo n.º 2
0
 private void ExecuteEditWeapon()
 {
     if (SelectedWeapon < Weapons.Count && SelectedWeapon >= 0)
     {
         AddWeaponWindowViewModel addWeaponWindowViewModel = new AddWeaponWindowViewModel(Weapons[SelectedWeapon]);
         Model.Weapon             weapon = addWeaponWindowViewModel.GetWeapon();
         if (weapon != null)
         {
             Weapons[SelectedWeapon] = weapon;
         }
     }
 }