diff --git a/Bus/Bus/FormMapWithSetDoubleDeckerBus.cs b/Bus/Bus/FormMapWithSetDoubleDeckerBus.cs index 9788f3d..9391f48 100644 --- a/Bus/Bus/FormMapWithSetDoubleDeckerBus.cs +++ b/Bus/Bus/FormMapWithSetDoubleDeckerBus.cs @@ -13,8 +13,6 @@ namespace Bus { public partial class FormMapWithSetDoubleDeckerBus : Form { - private MapWithSetDoubleDeckerBusGeneric _mapBusCollectionGeneric; - private readonly Dictionary _mapsDict = new() { {"Простая карта", new SimpleMap() }, @@ -70,14 +68,6 @@ namespace Bus map = new MyMap(); break; } - if(map != null) - { - _mapBusCollectionGeneric = new MapWithSetDoubleDeckerBusGeneric(pictureBox.Width, pictureBox.Height, map); - } - else - { - _mapBusCollectionGeneric = null; - } } private void ButtonAddBus_Click(object sender, EventArgs e) diff --git a/Bus/Bus/MapWithSetDoubleDeckerBusGeneric.cs b/Bus/Bus/MapWithSetDoubleDeckerBusGeneric.cs index 6d838e1..6e385d9 100644 --- a/Bus/Bus/MapWithSetDoubleDeckerBusGeneric.cs +++ b/Bus/Bus/MapWithSetDoubleDeckerBusGeneric.cs @@ -7,8 +7,8 @@ using System.Threading.Tasks; namespace Bus { internal class MapWithSetDoubleDeckerBusGeneric - where T : class, IDrawingObject - where U : AbstractMap + where T : class, IEquatable, IDrawingObject + where U : AbstractMap { private readonly int _pictureWidth; private readonly int _pictureHeight; diff --git a/Bus/Bus/SetDoubleDeckerBusGeneric.cs b/Bus/Bus/SetDoubleDeckerBusGeneric.cs index e90f37b..4cd28d2 100644 --- a/Bus/Bus/SetDoubleDeckerBusGeneric.cs +++ b/Bus/Bus/SetDoubleDeckerBusGeneric.cs @@ -6,9 +6,9 @@ using System.Threading.Tasks; namespace Bus { - internal class SetDoubleDeckerBusGeneric - where T : class, IEquatable, IDrawingObject - where U : AbstractMap + internal class SetDoubleDeckerBusGeneric + where T : class, IEquatable + { private readonly List _places; public int Count => _places.Count;