Изменения в MapWithSetLocomotiveGeneric
This commit is contained in:
parent
0c626b2cb3
commit
4b59366b42
@ -147,5 +147,23 @@ namespace ProjectLocomotive
|
||||
}
|
||||
}
|
||||
}
|
||||
/// Получение данных в виде строки
|
||||
public string GetData(char separatorType, char separatorData)
|
||||
{
|
||||
string data = $"{_map.GetType().Name}{separatorType}";
|
||||
foreach (var locomotive in _setLocomotives.GetLocomotives())
|
||||
{
|
||||
data += $"{locomotive.getInfo()}{separatorData}";
|
||||
}
|
||||
return data;
|
||||
}
|
||||
/// Загрузка списка из массива строк
|
||||
public void LoadData(string[] records)
|
||||
{
|
||||
foreach (var rec in records)
|
||||
{
|
||||
_setLocomotives.Insert(DrawningObject.Create(rec) as T);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user