Changing return type of Insert and Remove

This commit is contained in:
1yuee 2022-10-03 16:12:35 +04:00
parent cda44e6ec9
commit 8efe9be84a

View File

@ -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();