Изменил(а) на 'ProjectPlane/ProjectPlane/MapsCollection.cs'
This commit is contained in:
parent
270dda1a8f
commit
0379590e64
@ -84,16 +84,28 @@ namespace ProjectPlane
|
||||
byte[] info = new UTF8Encoding(true).GetBytes(text);
|
||||
stream.Write(info, 0, info.Length);
|
||||
}
|
||||
|
||||
public bool SaveDict(string filename)
|
||||
public bool SaveData(string filename)
|
||||
{
|
||||
if (File.Exists(filename))
|
||||
{
|
||||
File.Delete(filename);
|
||||
}
|
||||
using (FileStream fs = new(filename, FileMode.Create))
|
||||
using (StreamWriter sw = new StreamWriter(fs, Encoding.UTF8))
|
||||
{
|
||||
sw.WriteLine("MapsCollection");
|
||||
foreach (var storage in _mapStorages)
|
||||
{
|
||||
|
||||
sw.WriteLine(
|
||||
$"{storage.Key}{separatorDict}{storage.Value.GetData(separatorDict, separatorData)}"
|
||||
);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Загрузка нформации по автомобилям на парковках из файла
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user