LabWork_04 #9

Closed
maxnes3 wants to merge 3 commits from LabWork_04 into LabWork_03
2 changed files with 2 additions and 3 deletions
Showing only changes of commit 0613fd9196 - Show all commits

View File

@ -97,7 +97,7 @@ namespace WarmlyShip
if (form.ShowDialog() == DialogResult.OK)
{
DrawningObjectShip ship = new(form.SelectedShip);
if (_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] + ship == 1)
if (_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] + ship > -1)
{
MessageBox.Show("Объект добавлен");
pictureBox.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet();

View File

@ -22,8 +22,7 @@ namespace WarmlyShip
public int Insert(T ship)
{
_places.Insert(0, ship);
return 1;
return Insert(ship, 0);
}
public int Insert(T ship, int position)