diff --git a/ElectricLocomotive/Generics/LocomotivesGenericStorage.cs b/ElectricLocomotive/Generics/LocomotivesGenericStorage.cs index 5317ad7..ddc84fb 100644 --- a/ElectricLocomotive/Generics/LocomotivesGenericStorage.cs +++ b/ElectricLocomotive/Generics/LocomotivesGenericStorage.cs @@ -129,7 +129,7 @@ namespace ProjectElectricLocomotive.Generics $"{elem?.GetDataForSave(_separatorForObject)}" + $"{_separatorRecords}"); } - data.Append($"{record.Key}{_separatorForKeyValue}{records}"); + data.Append($"{record.Key}{_separatorForKeyValue}{records}{Environment.NewLine}"); } if (data.Length == 0) { @@ -174,7 +174,6 @@ namespace ProjectElectricLocomotive.Generics //если нет такой записи, то это не те данные return false; } - strs = strs[1].Split(_separatorRecords, StringSplitOptions.RemoveEmptyEntries); _locomotiveStorage.Clear(); foreach (string data in strs) { @@ -187,6 +186,7 @@ namespace ProjectElectricLocomotive.Generics LocomotivesGenericCollection collection = new(_pictureWidth, _pictureHeight); string[] set = record[1].Split(_separatorRecords, StringSplitOptions.RemoveEmptyEntries); + Array.Reverse(set); foreach (string elem in set) { DrawningLocomotive? locomotive =