Nugaev D.N. LabWork08 #11
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user