так
This commit is contained in:
parent
9347be7d3b
commit
0613fd9196
@ -97,7 +97,7 @@ namespace WarmlyShip
|
|||||||
if (form.ShowDialog() == DialogResult.OK)
|
if (form.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
DrawningObjectShip ship = new(form.SelectedShip);
|
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("Объект добавлен");
|
MessageBox.Show("Объект добавлен");
|
||||||
pictureBox.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet();
|
pictureBox.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet();
|
||||||
|
@ -22,8 +22,7 @@ namespace WarmlyShip
|
|||||||
|
|
||||||
public int Insert(T ship)
|
public int Insert(T ship)
|
||||||
{
|
{
|
||||||
_places.Insert(0, ship);
|
return Insert(ship, 0);
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Insert(T ship, int position)
|
public int Insert(T ship, int position)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user