Ejemplo n.º 1
0
        private void AddButton_Click(object sender, RoutedEventArgs e)
        {
            WeaponEditor editor = new WeaponEditor();

            if (editor.ShowDialog() == true)
            {
                weaponlistLoader.Add(editor.TempWeapon);
                Update();
                hasChanged = true;
            }
        }
Ejemplo n.º 2
0
 private void EditButton_Click(object sender, RoutedEventArgs e)
 {
     if (dgWeaponList.SelectedIndex != -1)
     {
         WeaponEditor editor = new WeaponEditor();
         editor.EditWeapon((Weapon)dgWeaponList.SelectedItem);
         if (editor.ShowDialog() == true)
         {
             Update();
             hasChanged = true;
         }
     }
 }