изменения
This commit is contained in:
parent
974fa03ade
commit
319fa1298d
@ -53,7 +53,7 @@ MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
||||
return;
|
||||
}
|
||||
int pos = Convert.ToInt32(maskedTextBoxNumber.Text);
|
||||
if (_ships - pos != null)
|
||||
if (!(_ships - pos))
|
||||
{
|
||||
MessageBox.Show("Объект удален");
|
||||
pictureBoxCollection.Image = _ships.ShowShips();
|
||||
|
@ -67,15 +67,15 @@ namespace Lab1ContainersShip
|
||||
/// <param name="collect"></param>
|
||||
/// <param name="pos"></param>
|
||||
/// <returns></returns>
|
||||
public static T operator -(ShipGenericCollection<T, U> collect, int
|
||||
public static bool operator -(ShipGenericCollection<T, U> collect, int
|
||||
pos)
|
||||
{
|
||||
T obj = collect._collection.Get(pos);
|
||||
if (obj != null)
|
||||
{
|
||||
collect._collection.Remove(pos);
|
||||
return collect._collection.Remove(pos);
|
||||
}
|
||||
return obj;
|
||||
return false;
|
||||
}
|
||||
/// <summary>
|
||||
/// Получение объекта IMoveableObject
|
||||
|
Loading…
Reference in New Issue
Block a user