Nugaev D.N. LabWork08 #11

Closed
Damir_Nugaev_ISEbd-22 wants to merge 4 commits from Lab_work08 into Lab_work07
3 changed files with 5 additions and 15 deletions
Showing only changes of commit 45314704df - Show all commits

View File

@ -13,8 +13,6 @@ namespace Bus
{
public partial class FormMapWithSetDoubleDeckerBus : Form
{
private MapWithSetDoubleDeckerBusGeneric<DrawingObjectBus, AbstractMap> _mapBusCollectionGeneric;
private readonly Dictionary<string, AbstractMap> _mapsDict = new()
{
{"Простая карта", new SimpleMap() },
@ -70,14 +68,6 @@ namespace Bus
map = new MyMap();
break;
}
if(map != null)
{
_mapBusCollectionGeneric = new MapWithSetDoubleDeckerBusGeneric<DrawingObjectBus, AbstractMap>(pictureBox.Width, pictureBox.Height, map);
}
else
{
_mapBusCollectionGeneric = null;
}
}
private void ButtonAddBus_Click(object sender, EventArgs e)

View File

@ -7,8 +7,8 @@ using System.Threading.Tasks;
namespace Bus
{
internal class MapWithSetDoubleDeckerBusGeneric<T, U>
where T : class, IDrawingObject
where U : AbstractMap
where T : class, IEquatable<T>, IDrawingObject
where U : AbstractMap
{
private readonly int _pictureWidth;
private readonly int _pictureHeight;

View File

@ -6,9 +6,9 @@ using System.Threading.Tasks;
namespace Bus
{
internal class SetDoubleDeckerBusGeneric<T, U>
where T : class, IEquatable<T>, IDrawingObject
where U : AbstractMap
internal class SetDoubleDeckerBusGeneric<T>
where T : class, IEquatable<T>
{
private readonly List<T> _places;
public int Count => _places.Count;