Исправил, готово
This commit is contained in:
parent
7b693f5fd7
commit
10edf8895b
@ -106,7 +106,7 @@ namespace AntiAircraftGun
|
||||
FormAntiAirCraftGun form = new();
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
if (obj + form.SelectedZenit)
|
||||
if ((obj + form.SelectedZenit)==1)
|
||||
{
|
||||
MessageBox.Show("Объект добавлен");
|
||||
pictureBoxCollection.Image = obj.ShowZenits();
|
||||
|
@ -38,18 +38,18 @@ namespace AntiAircraftGun.Generics
|
||||
public int Insert(T car)
|
||||
{
|
||||
if (_places.Count == _maxCount)
|
||||
return false;
|
||||
return -1;
|
||||
Insert(car, 0);
|
||||
return true;
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
public bool Insert(T car, int position)
|
||||
public int Insert(T car, int position)
|
||||
{
|
||||
if (!(position >= 0 && position <= Count && _places.Count < _maxCount))
|
||||
return false;
|
||||
return -1;
|
||||
_places.Insert(position, car);
|
||||
return true;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user