Es wird ein backup angelegt bevor die datei geöffnet wird um Datenverlust zu vermeiden.

massenstatistik deaktiviert
This commit is contained in:
Husky
2018-07-30 15:38:07 +02:00
parent 90e9191e4c
commit e14f251a69
2 changed files with 12 additions and 8 deletions

View File

@@ -38,7 +38,10 @@ namespace Database
string filepath = Path.Combine(projektpfad, string.Format("{0}.xaml", projekt));
this.projektpfad = filepath;
if (File.Exists(filepath))
{
File.Copy(filepath, string.Format("{0}_{1}_{2}.bak", filepath,DateTime.Now.ToShortDateString(),DateTime.Now.Ticks));
loadedProjekt = XamlServices.Load(filepath) as KlassenBIB.Projekt;
}
else
loadedProjekt = new KlassenBIB.Projekt();
return true;