4 базовая лабораторная

This commit is contained in:
katana 2023-11-04 15:13:17 +04:00
parent 016d864a65
commit c912beb8e9
2 changed files with 4 additions and 4 deletions

View File

@ -18,14 +18,14 @@ namespace ProjectSeaplane
/// <summary> /// <summary>
/// Набор объектов /// Набор объектов
/// </summary> /// </summary>
private readonly CarsGenericStorage _storage; private readonly PlanesGenericStorage _storage;
/// <summary> /// <summary>
/// Конструктор /// Конструктор
/// </summary> /// </summary>
public FormPlaneCollection() public FormPlaneCollection()
{ {
InitializeComponent(); InitializeComponent();
_storage = new CarsGenericStorage(pictureBoxCollection.Width, pictureBoxCollection.Height); _storage = new PlanesGenericStorage(pictureBoxCollection.Width, pictureBoxCollection.Height);
} }
/// <summary> /// <summary>
/// Заполнение listBoxObjects /// Заполнение listBoxObjects

View File

@ -9,13 +9,13 @@ using ProjectSeaplane.Generics;
namespace ProjectSeaplane.Generics namespace ProjectSeaplane.Generics
{ {
internal class CarsGenericStorage internal class PlanesGenericStorage
{ {
readonly Dictionary<string, PlanesGenericCollection<DrawningPlane, DrawningObjectPlane>> _planeStorages; readonly Dictionary<string, PlanesGenericCollection<DrawningPlane, DrawningObjectPlane>> _planeStorages;
public List<string> Keys => _planeStorages.Keys.ToList(); public List<string> Keys => _planeStorages.Keys.ToList();
private readonly int _pictureWidth; private readonly int _pictureWidth;
private readonly int _pictureHeight; private readonly int _pictureHeight;
public CarsGenericStorage(int pictureWidth, int pictureHeight) public PlanesGenericStorage(int pictureWidth, int pictureHeight)
{ {
_planeStorages = new Dictionary<string, PlanesGenericCollection<DrawningPlane, DrawningObjectPlane>>(); _planeStorages = new Dictionary<string, PlanesGenericCollection<DrawningPlane, DrawningObjectPlane>>();
_pictureWidth = pictureWidth; _pictureWidth = pictureWidth;