Agliullov D. A. Lab Work 3 Advanced #4

Merged
eegov merged 13 commits from Lab3 into Lab2 2022-10-14 10:14:31 +04:00
Showing only changes of commit a20390f707 - Show all commits

View File

@ -23,7 +23,7 @@ namespace AirBomber
/// <param name="airplane">самолет.</param>
private void AddAirplaneInMap(DrawningObject airplane)
{
if (airplane == null || !(_mapAirplanesCollectionGeneric + airplane))
if (airplane == null || (_mapAirplanesCollectionGeneric + airplane) == -1)
{
MessageBox.Show("Не удалось добавить объект");
}
@ -186,7 +186,7 @@ namespace AirBomber
return;
}
int pos = Convert.ToInt32(maskedTextBoxPosition.Text);
if (_mapAirplanesCollectionGeneric - pos)
if (_mapAirplanesCollectionGeneric - pos != null)
{
MessageBox.Show("Объект удален");
pictureBox.Image = _mapAirplanesCollectionGeneric.ShowSet();