From 45314704df58079f982618855cfb87e51300c90c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D0=B8=D1=80=20=D0=9D=D1=83=D0=B3=D0=B0?= =?UTF-8?q?=D0=B5=D0=B2?= Date: Wed, 7 Dec 2022 01:31:33 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=B4=D0=B0=D0=BD=D0=BD=D0=B0=D1=8F=20La?= =?UTF-8?q?bWork08=202.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bus/Bus/FormMapWithSetDoubleDeckerBus.cs | 10 ---------- Bus/Bus/MapWithSetDoubleDeckerBusGeneric.cs | 4 ++-- Bus/Bus/SetDoubleDeckerBusGeneric.cs | 6 +++--- 3 files changed, 5 insertions(+), 15 deletions(-) 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;