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