namespace ElectricLocomotive; public class LocosGenericStorage { readonly Dictionary> _electricLocoStorages; public List Keys => _electricLocoStorages.Keys.ToList(); private readonly int _pictureWidth; private readonly int _pictureHeight; public LocosGenericStorage(int pictureWidth, int pictureHeight) { _electricLocoStorages = new Dictionary>(); _pictureWidth = pictureWidth; _pictureHeight = pictureHeight; } public void AddSet(string name) { _electricLocoStorages.Add(name, new LocosGenericCollection (_pictureWidth, _pictureHeight)); } public void DelSet(string name) { if (!_electricLocoStorages.ContainsKey(name)) return; _electricLocoStorages.Remove(name); } public LocosGenericCollection? this[string ind] { get { if (_electricLocoStorages.ContainsKey(ind)) return _electricLocoStorages[ind]; return null; } } }