private void addWeaponAbility_Click(object sender, EventArgs e) { WeaponAbility newAbility = (WeaponAbility)abilityCombo.SelectedItem; newWeapon.AddWeaponAbility(newAbility); abilityBox.DataSource = null; abilityBox.DataSource = newWeapon.WeaponAbilities; abilityBox.DisplayMember = "ability"; }
private void addAbilityButton_Click(object sender, EventArgs e) { WeaponAbility newAbility = (WeaponAbility)abilitiesCombo.SelectedItem; editWeapon.AddWeaponAbility(newAbility); weaponController.InsertWeaponAbilityInstance(editWeapon, newAbility); abilitiesListBox.DataSource = null; abilitiesListBox.DataSource = editWeapon.WeaponAbilities; abilitiesListBox.DisplayMember = "ability"; }