private void RemoveWeaponButton_Click(object sender, EventArgs e)
 {
     editUnit.RemoveWeapon(editWeapon);
     WeaponsListBox.DataSource    = null;
     WeaponsListBox.DataSource    = editUnit.Weapons;
     WeaponsListBox.DisplayMember = "Fullstring";
 }
示例#2
0
        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";
        }