Изменил(а) на 'ProjectPlane/ProjectPlane/MapsCollection.cs'
This commit is contained in:
parent
62544c6b14
commit
ad75bc4a52
@ -84,7 +84,7 @@ namespace ProjectPlane
|
||||
byte[] info = new UTF8Encoding(true).GetBytes(text);
|
||||
stream.Write(info, 0, info.Length);
|
||||
}
|
||||
public bool SaveData(string filename)
|
||||
public void SaveData(string filename)
|
||||
{
|
||||
if (File.Exists(filename))
|
||||
{
|
||||
@ -102,7 +102,6 @@ namespace ProjectPlane
|
||||
);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -111,11 +110,11 @@ namespace ProjectPlane
|
||||
/// </summary>
|
||||
/// <param name="filename"></param>
|
||||
/// <returns></returns>
|
||||
public bool LoadData(string filename)
|
||||
public void LoadData(string filename)
|
||||
{
|
||||
if (!File.Exists(filename))
|
||||
{
|
||||
return false;
|
||||
throw new Exception("File not found");
|
||||
}
|
||||
string bufferTextFromFile = "";
|
||||
using (FileStream fs = new(filename, FileMode.Open))
|
||||
@ -125,7 +124,7 @@ namespace ProjectPlane
|
||||
|
||||
if (!curLine.Contains("MapsCollection"))
|
||||
{
|
||||
return false;
|
||||
throw new Exception("Incorrect format");
|
||||
}
|
||||
|
||||
_mapStorages.Clear();
|
||||
@ -147,7 +146,6 @@ namespace ProjectPlane
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user