небольшие корректировки лабы 7
This commit is contained in:
parent
d4e32d2ba9
commit
504ea1e2a3
@ -74,7 +74,10 @@ namespace Sailboat.Generics
|
|||||||
public static T? operator -(BoatsGenericCollection<T, U> collect, int pos)
|
public static T? operator -(BoatsGenericCollection<T, U> collect, int pos)
|
||||||
{
|
{
|
||||||
T? obj = collect._collection[pos];
|
T? obj = collect._collection[pos];
|
||||||
|
if (obj != null)
|
||||||
|
{
|
||||||
collect._collection.Remove(pos);
|
collect._collection.Remove(pos);
|
||||||
|
}
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,6 +184,5 @@ namespace Sailboat.Generics
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -130,8 +130,6 @@ namespace Sailboat
|
|||||||
MessageBox.Show(ex.Message);
|
MessageBox.Show(ex.Message);
|
||||||
_logger.LogWarning($"{ex.Message} из набора {listBoxStorages.SelectedItem.ToString()}");
|
_logger.LogWarning($"{ex.Message} из набора {listBoxStorages.SelectedItem.ToString()}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonRefreshCollection_Click(object sender, EventArgs e)
|
private void buttonRefreshCollection_Click(object sender, EventArgs e)
|
||||||
@ -147,7 +145,6 @@ namespace Sailboat
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pictureBoxCollection.Image = obj.ShowBoats();
|
pictureBoxCollection.Image = obj.ShowBoats();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonAddObject_Click(object sender, EventArgs e)
|
private void buttonAddObject_Click(object sender, EventArgs e)
|
||||||
@ -222,6 +219,5 @@ namespace Sailboat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user