diff --git a/AirBomber/AirBomber/FormMapWithSetAirplanes.cs b/AirBomber/AirBomber/FormMapWithSetAirplanes.cs index 1b88ac8..9748436 100644 --- a/AirBomber/AirBomber/FormMapWithSetAirplanes.cs +++ b/AirBomber/AirBomber/FormMapWithSetAirplanes.cs @@ -55,7 +55,7 @@ if (form.ShowDialog() == DialogResult.OK) { DrawningObject airplane = new(form.SelectedAirplane); - if (form.SelectedAirplane == null || !(_mapAirplanesCollectionGeneric + airplane)) + if (form.SelectedAirplane == null || (_mapAirplanesCollectionGeneric + airplane) == -1) { MessageBox.Show("Не удалось добавить объект"); } @@ -82,7 +82,7 @@ return; } int pos = Convert.ToInt32(maskedTextBoxPosition.Text); - if (_mapAirplanesCollectionGeneric - pos) + if (_mapAirplanesCollectionGeneric - pos != null) { MessageBox.Show("Объект удален"); pictureBox.Image = _mapAirplanesCollectionGeneric.ShowSet();