From b86d3af35ec862770cbfcb3b0fd8815931c88d26 Mon Sep 17 00:00:00 2001 From: bekodeg Date: Tue, 28 Nov 2023 17:09:44 +0400 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81=20=D0=B1=D0=B0=D0=B3?= =?UTF-8?q?=D0=BE=D0=B2=20=D1=81=D0=BE=D1=85=D1=80=D0=B0=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ElectricLocomotive/Generics/LocomotivesGenericStorage.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 =