Создание класса LocomotivesGenericStorage

This commit is contained in:
Андрей Байгулов 2023-10-29 19:23:13 +04:00
parent 93037118d6
commit c9b0d52c9f

View File

@ -0,0 +1,72 @@
using ProjectElectricLocomotive.DrawingObjects;
using ProjectElectricLocomotive.Generics;
using ProjectElectricLocomotive.MovementStrategy;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectElectricLocomotive
{
internal class LocomotivesGenericStorage
{
/// <summary>
/// Словарь (хранилище)
/// </summary>
readonly Dictionary<string, LocomotivesGenericCollection<DrawingLocomotive, DrawingObjectLocomotive>> _locomotivesStorage;
/// Возвращение списка названий наборов
/// </summary>
public List<string> Keys => _locomotivesStorage.Keys.ToList();
/// <summary>
/// Ширина окна отрисовки
/// </summary>
private readonly int _pictureWidth;
/// <summary>
/// Высота окна отрисовки
/// </summary>
private readonly int _pictureHeight;
/// <summary>
/// Конструктор
/// </summary>
/// <param name="pictureWidth"></param>
/// <param name="pictureHeight"></param>
public LocomotivesGenericStorage(int pictureWidth, int pictureHeight)
{
_locomotivesStorage = new Dictionary<string, LocomotivesGenericCollection<DrawingLocomotive, DrawingObjectLocomotive>>();
_pictureWidth = pictureWidth;
_pictureHeight = pictureHeight;
}
/// <summary>
/// Добавление набора
/// </summary>
/// <param name="name">Название набора</param>
public void AddSet(string name)
{
// TODO Прописать логику для добавления
}
/// <summary>
/// Удаление набора
/// </summary>
/// <param name="name">Название набора</param>
public void DelSet(string name)
{
// TODO Прописать логику для удаления
}
/// <summary>
/// Доступ к набору
/// </summary>
/// <param name="ind"></param>
/// <returns></returns>
public LocomotivesGenericCollection<DrawingLocomotive, DrawingObjectLocomotive>?
this[string ind]
{
get
{
// TODO Продумать логику получения набора
return null;
}
}
}
}