XMLParser hinzugefügt

This commit is contained in:
Husky
2018-05-16 21:26:59 +02:00
parent f19443027e
commit ef626d0844
29 changed files with 1521 additions and 44 deletions

View File

@@ -41,7 +41,14 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Datenbank.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\KlassenBIB\KlassenBIB.csproj">
<Project>{c82bd650-466b-403f-bed9-2b1660771f54}</Project>
<Name>KlassenBIB</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

40
Database/Datenbank.cs Normal file
View File

@@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xaml;
namespace Database
{
public class Datenbank
{
public static readonly Datenbank instance = new Datenbank();
public static Datenbank Instance
{
get
{
return instance;
}
}
public KlassenBIB.Projekt loadedProjekt = null;
private string projektpfad = string.Empty;
public bool LoadProjekt(string filepath)
{
projektpfad = filepath;
if (File.Exists(filepath))
loadedProjekt = XamlServices.Load(filepath) as KlassenBIB.Projekt;
else
loadedProjekt = new KlassenBIB.Projekt();
return true;
}
public void SaveProjekt()
{
XamlServices.Save(projektpfad, loadedProjekt);
}
}
}