после доп задания
This commit is contained in:
parent
256a3c4bf4
commit
d0e1ba4024
@ -190,5 +190,28 @@ public bool SaveData(string filename)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public bool SaveDop(string filename, string key)
|
||||
{
|
||||
if (File.Exists(filename))
|
||||
{
|
||||
File.Delete(filename);
|
||||
}
|
||||
StringBuilder data = new StringBuilder();
|
||||
ShipGenericCollection<DrawingShip, DrawningObjectShip> record = _shipStorages[key];
|
||||
if (!_shipStorages.ContainsKey(key))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if(record != null)
|
||||
{
|
||||
using (StreamWriter sr = new StreamWriter(filename))
|
||||
{
|
||||
sr.Write(filename + " ");
|
||||
sr.WriteLine(record);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user