Code cleanup durchgeführt
This commit is contained in:
@@ -39,17 +39,7 @@ namespace Database
|
|||||||
if(File.Exists(filepath))
|
if(File.Exists(filepath))
|
||||||
TeufelDB = XamlServices.Load("./projekte/TeufelDB.xaml") as KlassenBIB.DB;
|
TeufelDB = XamlServices.Load("./projekte/TeufelDB.xaml") as KlassenBIB.DB;
|
||||||
|
|
||||||
//Debugger.Break();
|
|
||||||
/*filepath = Path.Combine("./projekte","MainDatenbank.xaml");
|
|
||||||
if(File.Exists(filepath))
|
|
||||||
{
|
|
||||||
MainDatenbank = XamlServices.Load(filepath) as KlassenBIB.MainDataBase;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MainDatenbank = new MainDataBase();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private string projektpfad = string.Empty;
|
private string projektpfad = string.Empty;
|
||||||
@@ -57,31 +47,7 @@ namespace Database
|
|||||||
{
|
{
|
||||||
this.projekt = projekt;
|
this.projekt = projekt;
|
||||||
loadedProjekt = Datenbank.Instance.TeufelDB.Projekte.Find(x => x.Nummer != null && x.Nummer.Equals(projekt));
|
loadedProjekt = Datenbank.Instance.TeufelDB.Projekte.Find(x => x.Nummer != null && x.Nummer.Equals(projekt));
|
||||||
//Debugger.Break();
|
|
||||||
//UnPackProject("18-850","willyteufelchen");
|
|
||||||
//PackSystem("./projekte/18-850.zip", "./projekte/18-850","willyteufelchen");
|
|
||||||
|
|
||||||
/*
|
|
||||||
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));
|
|
||||||
try
|
|
||||||
{
|
|
||||||
loadedProjekt = XamlServices.Load(filepath) as KlassenBIB.Projekt;
|
|
||||||
}
|
|
||||||
catch(XamlObjectWriterException ex)
|
|
||||||
{
|
|
||||||
if (ex.HResult.Equals(-2146233088))
|
|
||||||
throw new DataBaseVersionMismatchException(ex.Message);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
loadedProjekt = new KlassenBIB.Projekt();
|
|
||||||
|
|
||||||
*/
|
|
||||||
if (!File.Exists("./projekte/TeufelDB.xaml"))
|
if (!File.Exists("./projekte/TeufelDB.xaml"))
|
||||||
{
|
{
|
||||||
UpdateDatabase.UpdateNewGuids();
|
UpdateDatabase.UpdateNewGuids();
|
||||||
@@ -104,28 +70,6 @@ namespace Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void Test()
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
using (MemoryStream memoryStream = new MemoryStream())
|
|
||||||
{
|
|
||||||
using (var fileStream = new FileStream("./test.zip", FileMode.Open))
|
|
||||||
{
|
|
||||||
fileStream.Seek(0, SeekOrigin.Begin);
|
|
||||||
fileStream.CopyTo(memoryStream);
|
|
||||||
}
|
|
||||||
using (ZipArchive archive = new ZipArchive(memoryStream, ZipArchiveMode.Update, true))
|
|
||||||
{
|
|
||||||
ZipArchiveEntry test = archive.CreateEntry("./datas/test.txt");
|
|
||||||
Debugger.Break();
|
|
||||||
}
|
|
||||||
|
|
||||||
Debugger.Break();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SaveProjekt()
|
public void SaveProjekt()
|
||||||
{
|
{
|
||||||
XamlServices.Save("./projekte/TeufelDB.xaml", TeufelDB);
|
XamlServices.Save("./projekte/TeufelDB.xaml", TeufelDB);
|
||||||
|
|||||||
@@ -47,7 +47,6 @@
|
|||||||
<Compile Include="Collections\ImprägnierBericht.cs" />
|
<Compile Include="Collections\ImprägnierBericht.cs" />
|
||||||
<Compile Include="Collections\Projekte.cs" />
|
<Compile Include="Collections\Projekte.cs" />
|
||||||
<Compile Include="DB.cs" />
|
<Compile Include="DB.cs" />
|
||||||
<Compile Include="LinerReste.cs" />
|
|
||||||
<Compile Include="Sanierung\Renovation\AbstractImprägnier.cs" />
|
<Compile Include="Sanierung\Renovation\AbstractImprägnier.cs" />
|
||||||
<Compile Include="Collections\AbwasserTechnischeAnlage.cs" />
|
<Compile Include="Collections\AbwasserTechnischeAnlage.cs" />
|
||||||
<Compile Include="Sanierung\Renovation\UVAnlagenTyp.cs" />
|
<Compile Include="Sanierung\Renovation\UVAnlagenTyp.cs" />
|
||||||
@@ -65,7 +64,6 @@
|
|||||||
<Compile Include="LeistungsVerzeichnis.cs" />
|
<Compile Include="LeistungsVerzeichnis.cs" />
|
||||||
<Compile Include="Collections\Leistungsverzeichnis.cs" />
|
<Compile Include="Collections\Leistungsverzeichnis.cs" />
|
||||||
<Compile Include="Lieferschein.cs" />
|
<Compile Include="Lieferschein.cs" />
|
||||||
<Compile Include="MainDataBase.cs" />
|
|
||||||
<Compile Include="Projekt.cs" />
|
<Compile Include="Projekt.cs" />
|
||||||
<Compile Include="Inspektionskuerzeln.cs" />
|
<Compile Include="Inspektionskuerzeln.cs" />
|
||||||
<Compile Include="Collections\Inspektionskuerzeln.cs" />
|
<Compile Include="Collections\Inspektionskuerzeln.cs" />
|
||||||
@@ -74,7 +72,7 @@
|
|||||||
<Compile Include="Sanierung\Reparatur\Quicklock.cs" />
|
<Compile Include="Sanierung\Reparatur\Quicklock.cs" />
|
||||||
<Compile Include="Sanierung\Reparatur.cs" />
|
<Compile Include="Sanierung\Reparatur.cs" />
|
||||||
<Compile Include="Sanierung\Reparatur\SanMitHarz.cs" />
|
<Compile Include="Sanierung\Reparatur\SanMitHarz.cs" />
|
||||||
<Compile Include="Sanierung\Renovation\AbstractSanieren.cs" />
|
<Compile Include="Sanierung\AbstractSanieren.cs" />
|
||||||
<Compile Include="Sanierung\Sanierung.cs" />
|
<Compile Include="Sanierung\Sanierung.cs" />
|
||||||
<Compile Include="Collections\Sanierung.cs" />
|
<Compile Include="Collections\Sanierung.cs" />
|
||||||
<Compile Include="Sanierungskonzept.cs" />
|
<Compile Include="Sanierungskonzept.cs" />
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace KlassenBIB
|
|
||||||
{
|
|
||||||
public class LinerReste
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Markup;
|
|
||||||
|
|
||||||
namespace KlassenBIB
|
|
||||||
{
|
|
||||||
[ContentProperty("AuftraggeberListe")]
|
|
||||||
public class MainDataBase
|
|
||||||
{
|
|
||||||
public Collections.AuftraggeberList AuftraggeberListe { get; set; }
|
|
||||||
public Collections.ImprägnierBericht ImprägnierBerichtListe { get; set; }
|
|
||||||
public MainDataBase()
|
|
||||||
{
|
|
||||||
AuftraggeberListe = new Collections.AuftraggeberList();
|
|
||||||
ImprägnierBerichtListe = new Collections.ImprägnierBericht();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user