-a
This commit is contained in:
20
DataGenTests/DataGenTests.csproj
Normal file
20
DataGenTests/DataGenTests.csproj
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
|
|
||||||
|
<IsPackable>false</IsPackable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
|
||||||
|
<PackageReference Include="MSTest.TestAdapter" Version="2.1.1" />
|
||||||
|
<PackageReference Include="MSTest.TestFramework" Version="2.1.1" />
|
||||||
|
<PackageReference Include="coverlet.collector" Version="1.3.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\DataGen\DataGen.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
28
DataGenTests/MeasureDataGenTests.cs
Normal file
28
DataGenTests/MeasureDataGenTests.cs
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using DataGen;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace DataGen.Tests
|
||||||
|
{
|
||||||
|
[TestClass()]
|
||||||
|
public class MeasureDataGenTests
|
||||||
|
{
|
||||||
|
[TestMethod()]
|
||||||
|
public void GenerateNewUnterdruckTest()
|
||||||
|
{
|
||||||
|
MeasureDataGen measureDataGen = new MeasureDataGen();
|
||||||
|
Task d = measureDataGen.GenerateUnterdruckAsync(DateTime.Now, -100,180);
|
||||||
|
|
||||||
|
|
||||||
|
//var x = await d;// measureDataGen.ReadMessureList.Where(x => x.MeasureType == Models.EMeasureType.LEERPHASE);
|
||||||
|
// 600 => 9 min
|
||||||
|
// 800 => 12 min
|
||||||
|
Debugger.Break();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -29,7 +29,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DichtheitManagement.Contrac
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mappings", "Mappings\Mappings.csproj", "{CB3C8585-E6B2-42AC-BED6-9924E7CDC355}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mappings", "Mappings\Mappings.csproj", "{CB3C8585-E6B2-42AC-BED6-9924E7CDC355}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GuiWPF_ViewModel", "GuiWPF_ViewModel\GuiWPF_ViewModel.csproj", "{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GuiWPF_ViewModel", "GuiWPF_ViewModel\GuiWPF_ViewModel.csproj", "{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DichtheitsprüfungTerminal", "DichtheitsprüfungTerminal\DichtheitsprüfungTerminal.csproj", "{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataGenTests", "DataGenTests\DataGenTests.csproj", "{88B9FEA8-6E47-4987-A8FA-2E68628690E1}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{29CAE66D-C5A2-4963-A78A-CEB5E5033224}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
vorlage.txt = vorlage.txt
|
||||||
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@@ -209,6 +218,30 @@ Global
|
|||||||
{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}.Release|x64.Build.0 = Release|Any CPU
|
{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}.Release|x86.ActiveCfg = Release|Any CPU
|
{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}.Release|x86.Build.0 = Release|Any CPU
|
{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{88B9FEA8-6E47-4987-A8FA-2E68628690E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{88B9FEA8-6E47-4987-A8FA-2E68628690E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{88B9FEA8-6E47-4987-A8FA-2E68628690E1}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{88B9FEA8-6E47-4987-A8FA-2E68628690E1}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{88B9FEA8-6E47-4987-A8FA-2E68628690E1}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{88B9FEA8-6E47-4987-A8FA-2E68628690E1}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{88B9FEA8-6E47-4987-A8FA-2E68628690E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{88B9FEA8-6E47-4987-A8FA-2E68628690E1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{88B9FEA8-6E47-4987-A8FA-2E68628690E1}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{88B9FEA8-6E47-4987-A8FA-2E68628690E1}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{88B9FEA8-6E47-4987-A8FA-2E68628690E1}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{88B9FEA8-6E47-4987-A8FA-2E68628690E1}.Release|x86.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
16
DichtheitsprüfungTerminal/DichtheitsprüfungTerminal.csproj
Normal file
16
DichtheitsprüfungTerminal/DichtheitsprüfungTerminal.csproj
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net5.0</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\DataGen\DataGen.csproj" />
|
||||||
|
<ProjectReference Include="..\DPGetDataContract\DPGetDataContract.csproj" />
|
||||||
|
<ProjectReference Include="..\Models\Models.csproj" />
|
||||||
|
<ProjectReference Include="..\ProtokollWriterContract\ProtokollWriterContract.csproj" />
|
||||||
|
<ProjectReference Include="..\ProtokollWriter\ProtokollWriter.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
147
DichtheitsprüfungTerminal/Program.cs
Normal file
147
DichtheitsprüfungTerminal/Program.cs
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
using System;
|
||||||
|
using DataGen;
|
||||||
|
using DPGetDataContract;
|
||||||
|
using ProtokollWriterContract;
|
||||||
|
using ProtokollWriter;
|
||||||
|
using Models;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Runtime.Serialization.Formatters.Binary;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace DichtheitsprüfungTerminal
|
||||||
|
{
|
||||||
|
class Program
|
||||||
|
{
|
||||||
|
static void Main(string[] args)
|
||||||
|
{
|
||||||
|
(new DichtheitsprüfTerminal()).LeseSchachtStammdaten();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class DichtheitsprüfTerminal
|
||||||
|
{
|
||||||
|
Auftraggeber auftraggeber = null;
|
||||||
|
Bauvorhaben bauvorhaben = null;
|
||||||
|
|
||||||
|
|
||||||
|
public DichtheitsprüfTerminal()
|
||||||
|
{
|
||||||
|
auftraggeber = new Auftraggeber();
|
||||||
|
bauvorhaben = new Bauvorhaben();
|
||||||
|
|
||||||
|
auftraggeber.Baustellen = new List<Bauvorhaben>();
|
||||||
|
auftraggeber.Baustellen.Add(bauvorhaben);
|
||||||
|
bauvorhaben.Auftraggeber = auftraggeber;
|
||||||
|
//bauvorhaben.Prüfobjekte = new List<Inspektionsobjekt>();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReadAuftraggeber()
|
||||||
|
{
|
||||||
|
Console.WriteLine("Auftraggeber");
|
||||||
|
Console.Write("Name: ");
|
||||||
|
auftraggeber.Name = Console.ReadLine();
|
||||||
|
Console.Write("Strasse: ");
|
||||||
|
auftraggeber.Strasse = Console.ReadLine();
|
||||||
|
Console.Write("Ort: ");
|
||||||
|
auftraggeber.Ort = Console.ReadLine();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReadBaustelle()
|
||||||
|
{
|
||||||
|
Console.WriteLine("Baustelle");
|
||||||
|
Console.Write("Standort: ");
|
||||||
|
bauvorhaben.Standort = Console.ReadLine();
|
||||||
|
Console.Write("Strasse: ");
|
||||||
|
bauvorhaben.Strasse = Console.ReadLine();
|
||||||
|
Console.Write("Ort: ");
|
||||||
|
bauvorhaben.Ort = Console.ReadLine();
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<PressureTest> GenerateData()
|
||||||
|
{
|
||||||
|
IDPGetDataContract getDataContract = new DataGen.MeasureDataGen();
|
||||||
|
List<PressureTest> result = new List<PressureTest>();
|
||||||
|
PressureTest presure = new PressureTest();
|
||||||
|
|
||||||
|
(getDataContract as MeasureDataGen).GenerateUnterdruck(DateTime.Now, -100, (12 * 60));
|
||||||
|
presure.Measuredatas = getDataContract.ReadMessureList;
|
||||||
|
result.Add(presure);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void SpeicherAuftraggeber(Auftraggeber auftraggeber)
|
||||||
|
{
|
||||||
|
BinaryFormatter bf = new BinaryFormatter();
|
||||||
|
FileStream fs = new FileStream("./"+auftraggeber.Name+".emp", FileMode.Create);
|
||||||
|
bf.Serialize(fs, auftraggeber);
|
||||||
|
fs.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
static Auftraggeber LadeAuftraggeber(string name)
|
||||||
|
{
|
||||||
|
BinaryFormatter bf = new BinaryFormatter();
|
||||||
|
if (!File.Exists("./"+name+".emp"))
|
||||||
|
return null;
|
||||||
|
FileStream fs = new FileStream("./"+name+".emp", FileMode.Open);
|
||||||
|
Auftraggeber result = (Auftraggeber)bf.Deserialize(fs);
|
||||||
|
fs.Close();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void LeseSchachtStammdaten()
|
||||||
|
{
|
||||||
|
|
||||||
|
ReadAuftraggeber();
|
||||||
|
ReadBaustelle();
|
||||||
|
|
||||||
|
//IProtokollWriter protokollWriter;
|
||||||
|
|
||||||
|
List<Inspektionsobjekt> prüfobjekte = new List<Inspektionsobjekt>();
|
||||||
|
Console.WriteLine("Schachterfassung");
|
||||||
|
while (Console.ReadLine() != "n")
|
||||||
|
{
|
||||||
|
string objektname;
|
||||||
|
decimal durchmesser;
|
||||||
|
decimal laenge;
|
||||||
|
|
||||||
|
Console.Write("Objektname: ");
|
||||||
|
objektname = Console.ReadLine();
|
||||||
|
Console.Write("Schachtlänge: ");
|
||||||
|
laenge = Convert.ToDecimal(Console.ReadLine());
|
||||||
|
Console.Write("Durchmesser: ");
|
||||||
|
durchmesser = Convert.ToDecimal(Console.ReadLine());
|
||||||
|
Console.Write("Ich arbeite");
|
||||||
|
|
||||||
|
|
||||||
|
prüfobjekte.Add(new Inspektionsobjekt()
|
||||||
|
{
|
||||||
|
Bauvorhaben = bauvorhaben,
|
||||||
|
Objektname = objektname,
|
||||||
|
Durchmesser = durchmesser,
|
||||||
|
ObjektLänge = laenge//,
|
||||||
|
//pressureTests = GenerateData()
|
||||||
|
}) ;
|
||||||
|
Console.WriteLine("Bin fertig, bei Fertig 'n' drücken");
|
||||||
|
}
|
||||||
|
bauvorhaben.Prüfobjekte = prüfobjekte;
|
||||||
|
SpeicherAuftraggeber(auftraggeber);
|
||||||
|
|
||||||
|
/*Console.WriteLine("Protokolle werden erstellt");
|
||||||
|
foreach(Inspektionsobjekt inspektionsobjekt in prüfobjekte)
|
||||||
|
{
|
||||||
|
protokollWriter = new SBTextFileWriter();
|
||||||
|
protokollWriter.WriteProtokoll(inspektionsobjekt, 0);
|
||||||
|
}
|
||||||
|
Console.WriteLine("Protkolle geschrieben");
|
||||||
|
*/
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
97
ProtokollWriter/vorlage.txt
Normal file
97
ProtokollWriter/vorlage.txt
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
[Allgemeines]
|
||||||
|
Datum = "{DATUM}"
|
||||||
|
Pruefnr = "{PRUEFNR}"
|
||||||
|
|
||||||
|
[Auftraggeber]
|
||||||
|
Name = "{AUFTRAGGEBER_NAME}"
|
||||||
|
Strasse = "{AUFTRAGGEBER_STRASSE}"
|
||||||
|
Ort = "{AUFTRAGGEBER_ORT}"
|
||||||
|
Tel = "{AUFTRAGGEBER_TEL}"
|
||||||
|
|
||||||
|
[Bauvorhaben]
|
||||||
|
Bauvorhaben = "{BAUVORHABEN_STANDORT}"
|
||||||
|
Pruefabschnitt = ""
|
||||||
|
Strasse = "{BAUVORHABEN_STRASSE}"
|
||||||
|
Ort = "{BAUVORHABEN_ORT}"
|
||||||
|
Pruefobjekt = ""
|
||||||
|
Pruefzeichen = ""
|
||||||
|
Einbaustelle = ""
|
||||||
|
Hersteller = ""
|
||||||
|
Anlagentyp = ""
|
||||||
|
Werkstoff = ""
|
||||||
|
|
||||||
|
[Messdatei]
|
||||||
|
Datei1 = "{MESSDATEI}.txt"
|
||||||
|
Datei2 = ""
|
||||||
|
Datei3 = ""
|
||||||
|
|
||||||
|
[Pruefung1999]
|
||||||
|
Pruefart = ""
|
||||||
|
Pegeloberflaeche = ""
|
||||||
|
Hoehewasserpegel = ""
|
||||||
|
Fuellvolumen = ""
|
||||||
|
Benetzteflaeche = ""
|
||||||
|
Zulwasserverlust = ""
|
||||||
|
Pruefzeit = ""
|
||||||
|
Zulpegelabfall = ""
|
||||||
|
Beginnsaettigung = ""
|
||||||
|
Gewaehltepruefzeit = ""
|
||||||
|
Beginnpruefung = ""
|
||||||
|
Beginnpruefungbeipegelwert = ""
|
||||||
|
Endepruefung = ""
|
||||||
|
Endepruefungbeipegelwert = ""
|
||||||
|
Messzeit = ""
|
||||||
|
Tatwasserverlust = ""
|
||||||
|
Tatpegelabfall = ""
|
||||||
|
Pruefresultat = ""
|
||||||
|
Bemerkungen = "{BEMERKUNG}"
|
||||||
|
Pruefdruck = ""
|
||||||
|
Gewaehltepruefdauer = ""
|
||||||
|
Zulwasserzugabe = ""
|
||||||
|
Pruefdauerbehaelter = ""
|
||||||
|
Wasserverlustbehaelter = ""
|
||||||
|
|
||||||
|
[Schachtbauwerk1999]
|
||||||
|
0 = ""
|
||||||
|
1 = ""
|
||||||
|
2 = ""
|
||||||
|
3 = ""
|
||||||
|
4 = ""
|
||||||
|
|
||||||
|
[Rohrleitungen1999]
|
||||||
|
0 = ""
|
||||||
|
1 = ""
|
||||||
|
2 = ""
|
||||||
|
3 = ""
|
||||||
|
4 = ""
|
||||||
|
|
||||||
|
[Luftprüfung]
|
||||||
|
Werkstoff = "2"
|
||||||
|
Pruefverfahren = "2"
|
||||||
|
Rohrquerschnitt = "0"
|
||||||
|
Rohrdurchmesser = "{DN}"
|
||||||
|
Rohrlaenge = "{LAENGE}"
|
||||||
|
Pruefvolumen = "{VOLUMEN}"
|
||||||
|
Pruefdruckp0 = "100,0"
|
||||||
|
Toleranzdeltap = "15,0"
|
||||||
|
SollBeruhigungszeit = "5"
|
||||||
|
SollPruefzeit = "3,0"
|
||||||
|
BeginnBeruhigungszeit = "22.08.2018 12:13:18"
|
||||||
|
PruefdruckBeginnBeruhigungszeit = "115,951"
|
||||||
|
BeginnPruefung = "22.08.2018 12:18:19"
|
||||||
|
PruefdruckBeginnPruefung = "117,049"
|
||||||
|
EndePruefung = "22.08.2018 12:21:20"
|
||||||
|
PruefdruckEndePruefung = "117,769"
|
||||||
|
IstPruefzeit = "03:01"
|
||||||
|
Druckabfall = "0,72"
|
||||||
|
Pruefresultat = "{PRUEFRESULTAT}"
|
||||||
|
Haltungsnummer = "{HALTUNGNR}"
|
||||||
|
AnzahlMuffen = ""
|
||||||
|
vonSchacht = "{VONSCHACHT}"
|
||||||
|
bisSchacht = "{BISSCHACHT}"
|
||||||
|
|
||||||
|
[Messdaten]
|
||||||
|
{@MESSDATEN}
|
||||||
|
|
||||||
|
[Protokolldatei]
|
||||||
|
Datei = "/C/Dichtheitsprüfgerät/Protokolle/000/{MESSDATEI}.txt"
|
||||||
Reference in New Issue
Block a user