PIbd-22 Chubykina P.P. LabWork_08 #12

Closed
chubykina_polina wants to merge 3 commits from LabWork_08.1 into LabWork_07
2 changed files with 5 additions and 1 deletions
Showing only changes of commit b5620899f0 - Show all commits

View File

@ -91,6 +91,10 @@ namespace Sailboat
MessageBox.Show(ex.Message);
_logger.LogWarning($"{ex.Message} в наборе {listBoxStorages.SelectedItem.ToString()}");
}
catch (ArgumentException ex)
{
MessageBox.Show(ex.Message);
}
}
private void buttonRemoveBoat_Click(object sender, EventArgs e)

View File

@ -56,7 +56,7 @@ namespace Sailboat.Generics
throw new StorageOverflowException(_maxCount);
if (equal != null && _places.Contains(boat, equal))
return false;
throw new ArgumentException("Данный объект уже есть в коллекции");
_places.Insert(0, boat);
return true;
}