снова переименовывания
This commit is contained in:
parent
986512d2fc
commit
60ee97faad
@ -11,11 +11,11 @@ namespace Laba1Loco
|
||||
/// <summary>
|
||||
/// Словарь (хранилище)
|
||||
/// </summary>
|
||||
readonly Dictionary<string, TrainsGenericCollection<DrawingTrain, DrawningObjectTrain>> _carStorages;
|
||||
readonly Dictionary<string, TrainsGenericCollection<DrawingTrain, DrawningObjectTrain>> _trainStorages;
|
||||
/// <summary>
|
||||
/// Возвращение списка названий наборов
|
||||
/// </summary>
|
||||
public List<string> Keys => _carStorages.Keys.ToList();
|
||||
public List<string> Keys => _trainStorages.Keys.ToList();
|
||||
/// <summary>
|
||||
/// Ширина окна отрисовки
|
||||
/// </summary>
|
||||
@ -31,7 +31,7 @@ namespace Laba1Loco
|
||||
/// <param name="pictureHeight"></param>
|
||||
public TrainsGenericStorage(int pictureWidth, int pictureHeight)
|
||||
{
|
||||
_carStorages = new Dictionary<string, TrainsGenericCollection<DrawingTrain, DrawningObjectTrain>>();
|
||||
_trainStorages = new Dictionary<string, TrainsGenericCollection<DrawingTrain, DrawningObjectTrain>>();
|
||||
_pictureWidth = pictureWidth;
|
||||
_pictureHeight = pictureHeight;
|
||||
}
|
||||
@ -41,9 +41,9 @@ namespace Laba1Loco
|
||||
/// <param name="name">Название набора</param>
|
||||
public void AddSet(string name)
|
||||
{
|
||||
if (_carStorages.ContainsKey(name))
|
||||
if (_trainStorages.ContainsKey(name))
|
||||
return;
|
||||
_carStorages[name] = new TrainsGenericCollection<DrawingTrain, DrawningObjectTrain>(_pictureWidth, _pictureHeight);
|
||||
_trainStorages[name] = new TrainsGenericCollection<DrawingTrain, DrawningObjectTrain>(_pictureWidth, _pictureHeight);
|
||||
}
|
||||
/// <summary>
|
||||
/// Удаление набора
|
||||
@ -51,9 +51,9 @@ namespace Laba1Loco
|
||||
/// <param name="name">Название набора</param>
|
||||
public void DelSet(string name)
|
||||
{
|
||||
if (!_carStorages.ContainsKey(name))
|
||||
if (!_trainStorages.ContainsKey(name))
|
||||
return;
|
||||
_carStorages.Remove(name);
|
||||
_trainStorages.Remove(name);
|
||||
}
|
||||
/// <summary>
|
||||
/// Доступ к набору
|
||||
@ -65,8 +65,8 @@ namespace Laba1Loco
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_carStorages.ContainsKey(ind))
|
||||
return _carStorages[ind];
|
||||
if (_trainStorages.ContainsKey(ind))
|
||||
return _trainStorages[ind];
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user