示例#1
0
        private void ExecuteAddDamage()
        {
            AddDamageWindowViewModel addDamageWindowViewModel = new AddDamageWindowViewModel();

            Model.Damage damage = addDamageWindowViewModel.GetDamage();
            if (damage != null)
            {
                DamageViewModel damageViewModel = new DamageViewModel {
                    Damage = damage
                };
                Damages.Add(damageViewModel);
            }
        }
示例#2
0
 private void ExecuteEditDamage()
 {
     if (SelectedDamage < Damages.Count)
     {
         AddDamageWindowViewModel addDamageWindowViewModel = new AddDamageWindowViewModel(Damages[SelectedDamage].Damage);
         Model.Damage             damage = addDamageWindowViewModel.GetDamage();
         if (damage != null)
         {
             DamageViewModel damageViewModel = new DamageViewModel {
                 Damage = damage
             };
             Damages[SelectedDamage] = damageViewModel;
         }
     }
 }