Code cleanup durchgeführt

This commit is contained in:
HuskyTeufel
2020-07-14 14:19:55 +02:00
parent 004bc22428
commit daf44bae33
5 changed files with 3 additions and 95 deletions

View File

@@ -39,17 +39,7 @@ namespace Database
if(File.Exists(filepath))
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;
@@ -57,31 +47,7 @@ namespace Database
{
this.projekt = 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"))
{
UpdateDatabase.UpdateNewGuids();
@@ -104,28 +70,6 @@ namespace Database
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()
{
XamlServices.Save("./projekte/TeufelDB.xaml", TeufelDB);

View File

@@ -47,7 +47,6 @@
<Compile Include="Collections\ImprägnierBericht.cs" />
<Compile Include="Collections\Projekte.cs" />
<Compile Include="DB.cs" />
<Compile Include="LinerReste.cs" />
<Compile Include="Sanierung\Renovation\AbstractImprägnier.cs" />
<Compile Include="Collections\AbwasserTechnischeAnlage.cs" />
<Compile Include="Sanierung\Renovation\UVAnlagenTyp.cs" />
@@ -65,7 +64,6 @@
<Compile Include="LeistungsVerzeichnis.cs" />
<Compile Include="Collections\Leistungsverzeichnis.cs" />
<Compile Include="Lieferschein.cs" />
<Compile Include="MainDataBase.cs" />
<Compile Include="Projekt.cs" />
<Compile Include="Inspektionskuerzeln.cs" />
<Compile Include="Collections\Inspektionskuerzeln.cs" />
@@ -74,7 +72,7 @@
<Compile Include="Sanierung\Reparatur\Quicklock.cs" />
<Compile Include="Sanierung\Reparatur.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="Collections\Sanierung.cs" />
<Compile Include="Sanierungskonzept.cs" />

View File

@@ -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
{
}
}

View File

@@ -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();
}
}
}