private void buttonRemoveShipPart_Click(object sender, EventArgs e) { ShipModel tag = GetCurrentShipTag(); if (tag == null) { return; } ShipModelSlot slot = GetCurrentShipSlot(); if (slot == null) { return; } tag.DeleteSlot(ref slot); listShipSlots.Items.Remove(slot); ClearShipSlot(); }