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

            Model.Weapon weapon = addWeaponWindowViewModel.GetWeapon();
            if (weapon != null)
            {
                Weapons.Add(weapon);
            }
        }
Esempio 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;
         }
     }
 }