Правки.

This commit is contained in:
Андрей Байгулов 2023-11-27 00:36:05 +04:00
parent fb1f7abf5c
commit c8545fdb07
2 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ namespace ProjectElectricLocomotive.DrawingObjects
/// <param name="width">Ширина</param>
/// <param name="height">Высота</param>
/// <returns>Объект</returns>
public static DrawingLocomotive? CreateDrawningCar(this string info, char
public static DrawingLocomotive? CreateDrawningLocomotive(this string info, char
separatorForObject, int width, int height)
{
string[] strs = info.Split(separatorForObject);

View File

@ -169,9 +169,9 @@ namespace ProjectElectricLocomotive.Generics
}
LocomotivesGenericCollection<DrawingLocomotive, DrawingObjectLocomotive> collection = new(_pictureWidth, _pictureHeight);
string[] set = record[1].Split(_separatorRecords, StringSplitOptions.RemoveEmptyEntries);
foreach (string thing in set)
foreach (string elem in set)
{
DrawingLocomotive? loco = thing?.CreateDrawingLocomotive(_separatorForObject, _pictureWidth, _pictureHeight);
DrawingLocomotive? loco = elem?.CreateDrawningLocomotive(_separatorForObject, _pictureWidth, _pictureHeight);
if (loco != null)
{
if ((collection + loco) == -1)