This commit is contained in:
Макс Бондаренко 2022-11-02 09:39:54 +04:00
parent 9347be7d3b
commit 0613fd9196
2 changed files with 2 additions and 3 deletions

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)