private void RemoveWeaponButton_Click(object sender, EventArgs e) { editUnit.RemoveWeapon(editWeapon); WeaponsListBox.DataSource = null; WeaponsListBox.DataSource = editUnit.Weapons; WeaponsListBox.DisplayMember = "Fullstring"; }
private void RemoveWeaponButton_Click(object sender, EventArgs e) { Weapon weaponToRemove = (Weapon)WeaponsListBox.SelectedItem; unit.RemoveWeapon(weaponToRemove); WeaponsListBox.DataSource = null; WeaponsListBox.DataSource = unit.Weapons; WeaponsListBox.DisplayMember = "fullString"; }