diff --git a/AirFighter/FormMapWithSetAircrafts.cs b/AirFighter/FormMapWithSetAircrafts.cs index b7228a9..f1894db 100644 --- a/AirFighter/FormMapWithSetAircrafts.cs +++ b/AirFighter/FormMapWithSetAircrafts.cs @@ -44,7 +44,6 @@ namespace AirFighter } break; - } if (map != null) { @@ -66,7 +65,7 @@ namespace AirFighter if (form.ShowDialog() == DialogResult.OK) { DrawingObjectAircraft aircraft = new(form.SelectedAircraft); - if (_mapAircraftsCollectionGeneric + aircraft) + if (_mapAircraftsCollectionGeneric + aircraft != -1) { MessageBox.Show("Object is added"); pictureBox.Image = _mapAircraftsCollectionGeneric.ShowSet(); @@ -89,7 +88,7 @@ namespace AirFighter return; } int pos = Convert.ToInt32(maskedTextBoxPostion.Text); - if (_mapAircraftsCollectionGeneric - pos) + if (_mapAircraftsCollectionGeneric - pos != null) { MessageBox.Show("Object is deleted"); pictureBox.Image = _mapAircraftsCollectionGeneric.ShowSet();