KlassenDLL im Main integriert
This commit is contained in:
236
SanSystem/BerichtGen/Bericht.cs
Normal file
236
SanSystem/BerichtGen/Bericht.cs
Normal file
@@ -0,0 +1,236 @@
|
||||
using SanShared;
|
||||
using Syncfusion.DocIO.DLS;
|
||||
using Syncfusion.DocToPDFConverter;
|
||||
using Syncfusion.Pdf;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BerichtGen
|
||||
{
|
||||
class Bericht
|
||||
{
|
||||
private List<Image> _listImages;
|
||||
/// <summary>
|
||||
/// Erstellt
|
||||
/// </summary>
|
||||
/// <param name="source">Die zuverwendete Vorlagenname</param>
|
||||
/// <param name="savepath">Pfad zum Speichern</param>
|
||||
/// <param name="filename"></param>
|
||||
/// <param name="daten"></param>
|
||||
/// <param name="bilderObjects">Zur zeit ohne Implementierung</param>
|
||||
/// <param name="tableContents">Für Tabellen anzeige</param>
|
||||
/// <param name="erzeugeDOC">Ein doc datei soll erzeugt werden</param>
|
||||
/// <param name="erzeugePDF">Ein Pdf datei soll erzeugt werden</param>
|
||||
public void Erzeuge(string source, string savepath,string filename, Hashtable daten,List<BilderObject> bilderObjects,DataTable tableContents, bool erzeugeDOC = false , bool erzeugePDF = true)
|
||||
{
|
||||
|
||||
if (bilderObjects != null)
|
||||
{
|
||||
_listImages = new List<Image>();
|
||||
foreach (BilderObject current in bilderObjects)
|
||||
{
|
||||
Image image = Image.FromFile(current.Path);
|
||||
_listImages.Add(ResizeImage(image, CalculateImageSizeForDocument(image.Height, image.Width)));
|
||||
image.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
WordDocument wordDocument = new WordDocument(source);
|
||||
|
||||
string[] fieldnames = null;
|
||||
string[] fieldvalues = null;
|
||||
|
||||
if(fieldnames == null || fieldvalues == null)
|
||||
{
|
||||
fieldnames = new string[daten.Count];
|
||||
fieldvalues = new string[daten.Count];
|
||||
}
|
||||
|
||||
uint counter = 0;
|
||||
foreach(DictionaryEntry hashtable in daten)
|
||||
{
|
||||
fieldnames[counter] = hashtable.Key.ToString();
|
||||
if (hashtable.Value == null)
|
||||
{
|
||||
fieldvalues[counter] = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
fieldvalues[counter] = hashtable.Value.ToString();
|
||||
}
|
||||
counter++;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
wordDocument.MailMerge.MergeImageField += new MergeImageFieldEventHandler(MailMerge_MergeImageField);
|
||||
|
||||
|
||||
|
||||
if (tableContents != null)
|
||||
wordDocument.MailMerge.ExecuteGroup(tableContents);
|
||||
|
||||
wordDocument.MailMerge.Execute(fieldnames, fieldvalues);
|
||||
|
||||
IWParagraph iWParagraph = null;
|
||||
var x = wordDocument.Sections;
|
||||
|
||||
foreach(IWSection section in wordDocument.Sections)
|
||||
{
|
||||
IWParagraphCollection paragraphs = section.Paragraphs;
|
||||
|
||||
foreach(IWParagraph item2 in paragraphs)
|
||||
{
|
||||
|
||||
if (item2.Text.StartsWith("@WeitereBilder")) {
|
||||
iWParagraph = item2;
|
||||
if(bilderObjects.Count > 0)
|
||||
{
|
||||
//section.ChildEntities.Clear();
|
||||
iWParagraph.Text = "Bilddokumentation der Sanierung";
|
||||
iWParagraph.AppendBreak(BreakType.LineBreak);
|
||||
IWTable wTable = section.Body.AddTable();
|
||||
wTable.ResetCells(1, 2);
|
||||
wTable.TableFormat.IsAutoResized = true;
|
||||
wTable.TableFormat.IsBreakAcrossPages = false;
|
||||
wTable.TableFormat.Borders.BorderType = BorderStyle.Dot;
|
||||
WTableRow wTableRow = wTable.Rows[0];
|
||||
bool flag = false;
|
||||
int num = -1;
|
||||
foreach (BilderObject foto in bilderObjects)
|
||||
{
|
||||
if (num == -1)
|
||||
num++;
|
||||
|
||||
if (flag)
|
||||
{
|
||||
wTableRow = wTable.AddRow();
|
||||
flag = false;
|
||||
}
|
||||
int index = 1;
|
||||
if (num % 2 == 0)
|
||||
{
|
||||
index = 0;
|
||||
flag = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
iWParagraph = wTableRow.Cells[index].AddParagraph();
|
||||
Image image2 = _listImages[num];
|
||||
if (image2 != null)
|
||||
{
|
||||
iWParagraph.AppendPicture(image2);
|
||||
if (foto != null)
|
||||
{
|
||||
iWParagraph.AppendBreak(BreakType.LineBreak);
|
||||
IWTextRange wTextRange = iWParagraph.AppendText(foto.Kommentar);
|
||||
wTextRange.CharacterFormat.FontName = "Arial";
|
||||
wTextRange.CharacterFormat.FontSize = 10f;
|
||||
}
|
||||
}
|
||||
num++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
iWParagraph.Text = "";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(erzeugeDOC)
|
||||
wordDocument.Save(Path.Combine(savepath,string.Format("{0}.doc",filename)), Syncfusion.DocIO.FormatType.Doc);
|
||||
|
||||
if (erzeugePDF)
|
||||
{
|
||||
string speichername = Path.Combine(savepath, string.Format("{0}.pdf", filename));
|
||||
DocToPDFConverter docToPDFConverter = new DocToPDFConverter();
|
||||
PdfDocument pdf = docToPDFConverter.ConvertToPDF(wordDocument);
|
||||
try
|
||||
{
|
||||
pdf.Save(speichername);
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
//pdf.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
private readonly double _cmPixel = 0.393700787;
|
||||
private readonly int _dpi = 120;
|
||||
private readonly double _imgWidthCmMax = 8.0;
|
||||
|
||||
private Size CalculateImageSizeForDocument(int height, int width)
|
||||
{
|
||||
double num = (double)height / (double)width;
|
||||
double num2 = this._imgWidthCmMax * num;
|
||||
int h = (int)(num2 * _cmPixel * (double)_dpi);
|
||||
int w = (int)(_imgWidthCmMax * _cmPixel * (double)_dpi);
|
||||
return new Size(w, h);
|
||||
}
|
||||
|
||||
private Image ResizeImage(Image image, Size size)
|
||||
{
|
||||
int width = image.Width;
|
||||
int height = image.Height;
|
||||
float num = (float)size.Width / (float)width;
|
||||
float num2 = (float)size.Height / (float)height;
|
||||
float num3 = (num2 < num) ? num2 : num;
|
||||
int width2 = (int)((float)width * num3);
|
||||
int height2 = (int)((float)height * num3);
|
||||
Bitmap bitmap = new Bitmap(width2, height2);
|
||||
try
|
||||
{
|
||||
bitmap.SetResolution(120f, 120f);
|
||||
Graphics graphics = Graphics.FromImage(bitmap);
|
||||
graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;
|
||||
graphics.DrawImage(image, 0, 0, width2, height2);
|
||||
graphics.Dispose();
|
||||
|
||||
}
|
||||
catch(Exception)
|
||||
{
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
System.GC.Collect();
|
||||
}
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
private void MailMerge_MergeImageField(object sender, MergeImageFieldEventArgs args)
|
||||
{
|
||||
|
||||
if(args.FieldName == "UVImageTemp" || args.FieldName == "UVImageDruck" || args.FieldName == "UVImageSpeed")
|
||||
{
|
||||
string source = args.FieldValue.ToString();
|
||||
if (!File.Exists(source)) return;
|
||||
args.Image = Image.FromFile(source);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
36
SanSystem/BerichtGen/BerichtWorker.cs
Normal file
36
SanSystem/BerichtGen/BerichtWorker.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BerichtGen
|
||||
{
|
||||
public class BerichtWorker
|
||||
{
|
||||
public static Image resizeImage(Image imgToResize, Size size)
|
||||
{
|
||||
int width = imgToResize.Width;
|
||||
int height = imgToResize.Height;
|
||||
float scale = 0f;
|
||||
float newWidth = 0f;
|
||||
float newHeight = 0f;
|
||||
|
||||
newWidth = (float)size.Width / (float)width;
|
||||
newHeight = (float)size.Height / (float)height;
|
||||
|
||||
scale = ((!(newHeight < newWidth)) ? newWidth : newHeight);
|
||||
int width2 = (int)((float)width * scale);
|
||||
int height2 = (int)((float)height * scale);
|
||||
|
||||
Bitmap bitmap = new Bitmap(width2, height2);
|
||||
Graphics graphics = Graphics.FromImage(bitmap);
|
||||
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||
graphics.DrawImage(imgToResize, 0, 0, width2, height2);
|
||||
graphics.Dispose();
|
||||
return bitmap;
|
||||
}
|
||||
}
|
||||
}
|
||||
136
SanSystem/BerichtGen/FrmOptions.Designer.cs
generated
Normal file
136
SanSystem/BerichtGen/FrmOptions.Designer.cs
generated
Normal file
@@ -0,0 +1,136 @@
|
||||
namespace BerichtGen
|
||||
{
|
||||
partial class FrmOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.btn_start = new System.Windows.Forms.Button();
|
||||
this.cb_doc = new System.Windows.Forms.CheckBox();
|
||||
this.cb_pdf = new System.Windows.Forms.CheckBox();
|
||||
this.rb_yes = new System.Windows.Forms.RadioButton();
|
||||
this.rb_no = new System.Windows.Forms.RadioButton();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btn_start
|
||||
//
|
||||
this.btn_start.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btn_start.Location = new System.Drawing.Point(374, 12);
|
||||
this.btn_start.Name = "btn_start";
|
||||
this.btn_start.Size = new System.Drawing.Size(91, 74);
|
||||
this.btn_start.TabIndex = 0;
|
||||
this.btn_start.Text = "Bericht erzeugen";
|
||||
this.btn_start.UseVisualStyleBackColor = true;
|
||||
this.btn_start.Click += new System.EventHandler(this.btn_start_Click);
|
||||
//
|
||||
// cb_doc
|
||||
//
|
||||
this.cb_doc.AutoSize = true;
|
||||
this.cb_doc.Enabled = false;
|
||||
this.cb_doc.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.cb_doc.Location = new System.Drawing.Point(6, 12);
|
||||
this.cb_doc.Name = "cb_doc";
|
||||
this.cb_doc.Size = new System.Drawing.Size(173, 24);
|
||||
this.cb_doc.TabIndex = 1;
|
||||
this.cb_doc.Text = "DOC datei erzeugen";
|
||||
this.cb_doc.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cb_pdf
|
||||
//
|
||||
this.cb_pdf.AutoSize = true;
|
||||
this.cb_pdf.Checked = true;
|
||||
this.cb_pdf.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.cb_pdf.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.cb_pdf.Location = new System.Drawing.Point(6, 35);
|
||||
this.cb_pdf.Name = "cb_pdf";
|
||||
this.cb_pdf.Size = new System.Drawing.Size(131, 24);
|
||||
this.cb_pdf.TabIndex = 2;
|
||||
this.cb_pdf.Text = "PDF erzeugen";
|
||||
this.cb_pdf.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rb_yes
|
||||
//
|
||||
this.rb_yes.AutoSize = true;
|
||||
this.rb_yes.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.rb_yes.Location = new System.Drawing.Point(221, 62);
|
||||
this.rb_yes.Name = "rb_yes";
|
||||
this.rb_yes.Size = new System.Drawing.Size(39, 24);
|
||||
this.rb_yes.TabIndex = 3;
|
||||
this.rb_yes.TabStop = true;
|
||||
this.rb_yes.Text = "ja";
|
||||
this.rb_yes.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rb_no
|
||||
//
|
||||
this.rb_no.AutoSize = true;
|
||||
this.rb_no.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.rb_no.Location = new System.Drawing.Point(266, 62);
|
||||
this.rb_no.Name = "rb_no";
|
||||
this.rb_no.Size = new System.Drawing.Size(57, 24);
|
||||
this.rb_no.TabIndex = 4;
|
||||
this.rb_no.TabStop = true;
|
||||
this.rb_no.Text = "nein";
|
||||
this.rb_no.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.Location = new System.Drawing.Point(2, 62);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(202, 20);
|
||||
this.label1.TabIndex = 5;
|
||||
this.label1.Text = "Nach dem erzeugen öffnen";
|
||||
//
|
||||
// FrmOptions
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(477, 97);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.rb_no);
|
||||
this.Controls.Add(this.rb_yes);
|
||||
this.Controls.Add(this.cb_pdf);
|
||||
this.Controls.Add(this.cb_doc);
|
||||
this.Controls.Add(this.btn_start);
|
||||
this.Name = "FrmOptions";
|
||||
this.Text = "Options";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button btn_start;
|
||||
private System.Windows.Forms.CheckBox cb_doc;
|
||||
private System.Windows.Forms.CheckBox cb_pdf;
|
||||
private System.Windows.Forms.RadioButton rb_yes;
|
||||
private System.Windows.Forms.RadioButton rb_no;
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
||||
107
SanSystem/BerichtGen/FrmOptions.cs
Normal file
107
SanSystem/BerichtGen/FrmOptions.cs
Normal file
@@ -0,0 +1,107 @@
|
||||
using SanShared;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace BerichtGen
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public partial class FrmOptions : Form
|
||||
{
|
||||
Thread generateProtokollThread;
|
||||
Hashtable grundDaten;
|
||||
string firma;
|
||||
string vorlage;
|
||||
string speicherpfad;
|
||||
string source;
|
||||
string filename;
|
||||
bool hidden = false;
|
||||
List<BilderObject> bilderObjects;
|
||||
|
||||
DataTable tableContent = null;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="firma"></param>
|
||||
/// <param name="vorlage"></param>
|
||||
/// <param name="speicherpfad"></param>
|
||||
/// <param name="filename"></param>
|
||||
/// <param name="grunddaten"></param>
|
||||
/// <param name="bilderObjects"></param>
|
||||
/// <param name="tableContent"></param>
|
||||
public FrmOptions(string firma, string vorlage, string speicherpfad, string filename, Hashtable grunddaten, List<BilderObject> bilderObjects, DataTable tableContent = null, bool hidden = false)
|
||||
{
|
||||
|
||||
InitializeComponent();
|
||||
Dongle dongle = new Dongle(60);
|
||||
Trace.WriteLine("FrmOptions: " + dongle.SyncfusionKey);
|
||||
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(dongle.SyncfusionKey);
|
||||
dongle.CleanDongle();
|
||||
|
||||
|
||||
this.firma = firma;
|
||||
this.vorlage = vorlage;
|
||||
this.speicherpfad = speicherpfad;
|
||||
this.grundDaten = grunddaten;
|
||||
this.bilderObjects = bilderObjects;
|
||||
this.tableContent = tableContent;
|
||||
this.source = Path.Combine("documents", firma, vorlage);
|
||||
this.filename = filename;
|
||||
this.hidden = hidden;
|
||||
if(hidden)
|
||||
{
|
||||
GenerateBericht();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Gen()
|
||||
{
|
||||
|
||||
Bericht bericht = new Bericht();
|
||||
bericht.Erzeuge(source, speicherpfad,filename, grundDaten, bilderObjects, tableContent,cb_doc.Checked,cb_pdf.Checked);
|
||||
}
|
||||
|
||||
private void GenerateBericht()
|
||||
{
|
||||
generateProtokollThread = new Thread(Gen);
|
||||
generateProtokollThread.IsBackground = true;
|
||||
generateProtokollThread.Start();
|
||||
|
||||
while (generateProtokollThread.IsAlive)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
if (rb_yes.Checked && cb_pdf.Checked && !hidden)
|
||||
{
|
||||
string pfad = Path.Combine(speicherpfad, string.Format("{0}.pdf", filename));
|
||||
Process process = new Process();
|
||||
process.StartInfo.FileName = "explorer";
|
||||
process.StartInfo.Arguments = pfad;
|
||||
//** Verbuggt
|
||||
FrmPDFViewer frmPDFViewer = new FrmPDFViewer(pfad);
|
||||
frmPDFViewer.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void btn_start_Click(object sender, EventArgs e)
|
||||
{
|
||||
GenerateBericht();
|
||||
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
120
SanSystem/BerichtGen/FrmOptions.resx
Normal file
120
SanSystem/BerichtGen/FrmOptions.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
97
SanSystem/BerichtGen/FrmPDFViewer.Designer.cs
generated
Normal file
97
SanSystem/BerichtGen/FrmPDFViewer.Designer.cs
generated
Normal file
@@ -0,0 +1,97 @@
|
||||
namespace BerichtGen
|
||||
{
|
||||
partial class FrmPDFViewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
Syncfusion.Windows.Forms.PdfViewer.MessageBoxSettings messageBoxSettings1 = new Syncfusion.Windows.Forms.PdfViewer.MessageBoxSettings();
|
||||
Syncfusion.Windows.PdfViewer.PdfViewerPrinterSettings pdfViewerPrinterSettings1 = new Syncfusion.Windows.PdfViewer.PdfViewerPrinterSettings();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmPDFViewer));
|
||||
Syncfusion.Windows.Forms.PdfViewer.TextSearchSettings textSearchSettings1 = new Syncfusion.Windows.Forms.PdfViewer.TextSearchSettings();
|
||||
this.pdfViewerControl = new Syncfusion.Windows.Forms.PdfViewer.PdfViewerControl();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pdfViewerControl
|
||||
//
|
||||
this.pdfViewerControl.CursorMode = Syncfusion.Windows.Forms.PdfViewer.PdfViewerCursorMode.SelectTool;
|
||||
this.pdfViewerControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pdfViewerControl.EnableContextMenu = true;
|
||||
this.pdfViewerControl.EnableNotificationBar = true;
|
||||
this.pdfViewerControl.HorizontalScrollOffset = 0;
|
||||
this.pdfViewerControl.IsBookmarkEnabled = false;
|
||||
this.pdfViewerControl.IsTextSearchEnabled = false;
|
||||
this.pdfViewerControl.IsTextSelectionEnabled = false;
|
||||
this.pdfViewerControl.Location = new System.Drawing.Point(0, 0);
|
||||
this.pdfViewerControl.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
messageBoxSettings1.EnableNotification = true;
|
||||
this.pdfViewerControl.MessageBoxSettings = messageBoxSettings1;
|
||||
this.pdfViewerControl.MinimumZoomPercentage = 50;
|
||||
this.pdfViewerControl.Name = "pdfViewerControl";
|
||||
this.pdfViewerControl.PageBorderThickness = 1;
|
||||
pdfViewerPrinterSettings1.PageOrientation = Syncfusion.Windows.PdfViewer.PdfViewerPrintOrientation.Auto;
|
||||
pdfViewerPrinterSettings1.PageSize = Syncfusion.Windows.PdfViewer.PdfViewerPrintSize.ActualSize;
|
||||
pdfViewerPrinterSettings1.PrintLocation = ((System.Drawing.PointF)(resources.GetObject("pdfViewerPrinterSettings1.PrintLocation")));
|
||||
pdfViewerPrinterSettings1.ShowPrintStatusDialog = true;
|
||||
this.pdfViewerControl.PrinterSettings = pdfViewerPrinterSettings1;
|
||||
this.pdfViewerControl.ReferencePath = null;
|
||||
this.pdfViewerControl.ScrollDisplacementValue = 0;
|
||||
this.pdfViewerControl.ShowHorizontalScrollBar = true;
|
||||
this.pdfViewerControl.ShowToolBar = true;
|
||||
this.pdfViewerControl.ShowVerticalScrollBar = true;
|
||||
this.pdfViewerControl.Size = new System.Drawing.Size(851, 922);
|
||||
this.pdfViewerControl.SpaceBetweenPages = 8;
|
||||
this.pdfViewerControl.TabIndex = 0;
|
||||
this.pdfViewerControl.Text = "pdfViewerControl1";
|
||||
textSearchSettings1.CurrentInstanceColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(255)))), ((int)(((byte)(171)))), ((int)(((byte)(64)))));
|
||||
textSearchSettings1.HighlightAllInstance = true;
|
||||
textSearchSettings1.OtherInstanceColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(254)))), ((int)(((byte)(255)))), ((int)(((byte)(0)))));
|
||||
this.pdfViewerControl.TextSearchSettings = textSearchSettings1;
|
||||
this.pdfViewerControl.VerticalScrollOffset = 0;
|
||||
this.pdfViewerControl.VisualStyle = Syncfusion.Windows.Forms.PdfViewer.VisualStyle.Default;
|
||||
this.pdfViewerControl.ZoomMode = Syncfusion.Windows.Forms.PdfViewer.ZoomMode.FitPage;
|
||||
//
|
||||
// FrmPDFViewer
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoSize = true;
|
||||
this.ClientSize = new System.Drawing.Size(851, 922);
|
||||
this.Controls.Add(this.pdfViewerControl);
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.Name = "FrmPDFViewer";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "FrmPDFViewer";
|
||||
this.Load += new System.EventHandler(this.FrmPDFViewer_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Syncfusion.Windows.Forms.PdfViewer.PdfViewerControl pdfViewerControl;
|
||||
}
|
||||
}
|
||||
34
SanSystem/BerichtGen/FrmPDFViewer.cs
Normal file
34
SanSystem/BerichtGen/FrmPDFViewer.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace BerichtGen
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public partial class FrmPDFViewer : Form
|
||||
{
|
||||
string pfad;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="pfad"></param>
|
||||
public FrmPDFViewer(string pfad)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.pfad = pfad;
|
||||
}
|
||||
|
||||
private void FrmPDFViewer_Load(object sender, EventArgs e)
|
||||
{
|
||||
pdfViewerControl.Load(pfad);
|
||||
}
|
||||
}
|
||||
}
|
||||
127
SanSystem/BerichtGen/FrmPDFViewer.resx
Normal file
127
SanSystem/BerichtGen/FrmPDFViewer.resx
Normal file
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="pdfViewerPrinterSettings1.PrintLocation" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0
|
||||
dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABVTeXN0ZW0uRHJh
|
||||
d2luZy5Qb2ludEYCAAAAAXgBeQAACwsCAAAAAAAAAAAAAAAL
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
121
SanSystem/BerichtGen/makeGraphic.cs
Normal file
121
SanSystem/BerichtGen/makeGraphic.cs
Normal file
@@ -0,0 +1,121 @@
|
||||
using SanShared;
|
||||
using Syncfusion.Windows.Forms.Chart;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BerichtGen
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class makeGraphic
|
||||
{
|
||||
private static ChartControl getGraph(List<UVcsvStrukture> input, string type)
|
||||
{
|
||||
Size size = new Size(400, 300);
|
||||
|
||||
ChartControl chartControl = new ChartControl();
|
||||
chartControl.Size = size;
|
||||
|
||||
|
||||
ChartAxis axis = chartControl.PrimaryYAxis;
|
||||
|
||||
|
||||
ChartAxisLayout layout1 = new ChartAxisLayout();
|
||||
|
||||
|
||||
layout1.Spacing = 12;
|
||||
|
||||
layout1.Axes.Add(axis);
|
||||
|
||||
|
||||
chartControl.ChartArea.YLayouts.Add(layout1);
|
||||
|
||||
ChartSeries mychart = new ChartSeries(type, ChartSeriesType.Line);
|
||||
|
||||
|
||||
int counter = 0;
|
||||
|
||||
|
||||
foreach (UVcsvStrukture pars in input)
|
||||
{
|
||||
if (type.Equals("Temperatur"))
|
||||
mychart.Points.Add(counter, pars.Temperatur);
|
||||
else if (type.Equals("Druck"))
|
||||
mychart.Points.Add(counter, pars.Druck);
|
||||
else if (type.Equals("Geschwindigkeit"))
|
||||
mychart.Points.Add(counter, pars.Geschwindigkeit);
|
||||
else
|
||||
throw new Exception("Kein gültiger Aufruf");
|
||||
counter++;
|
||||
}
|
||||
|
||||
mychart.YAxis = axis;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case "Temperatur":
|
||||
axis.Title = "°C";
|
||||
break;
|
||||
|
||||
case "Druck":
|
||||
axis.Title = "[mbar]";
|
||||
break;
|
||||
|
||||
case "Geschwindigkeit":
|
||||
axis.Title = "[cm]";
|
||||
break;
|
||||
}
|
||||
|
||||
axis.TitleFont = new Font("Segeo UI", 14F);
|
||||
|
||||
|
||||
chartControl.LegendsPlacement = ChartPlacement.Outside;
|
||||
chartControl.LegendPosition = ChartDock.Bottom;
|
||||
chartControl.LegendAlignment = ChartAlignment.Center;
|
||||
chartControl.Title.Visible = false;
|
||||
|
||||
chartControl.Series.Add(mychart);
|
||||
chartControl.Skins = Skins.Metro;
|
||||
|
||||
axis.EdgeLabelsDrawingMode = ChartAxisEdgeLabelsDrawingMode.Shift;
|
||||
|
||||
|
||||
return chartControl;
|
||||
}
|
||||
/// <summary>
|
||||
/// Erstellt die Drucksverlauf kurve
|
||||
/// </summary>
|
||||
/// <param name="struktures"></param>
|
||||
/// <param name="destinationPath"></param>
|
||||
/// <returns></returns>
|
||||
public static bool GetGraphics(List<UVcsvStrukture> struktures,string destinationPath)
|
||||
{
|
||||
Dongle dongle = new Dongle(60);
|
||||
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(dongle.SyncfusionKey);
|
||||
dongle.CleanDongle();
|
||||
|
||||
ChartControl tempChart = getGraph(struktures, "Temperatur");
|
||||
if (tempChart == null) return false;
|
||||
else
|
||||
tempChart.SaveImage(Path.Combine(destinationPath, "linerGraph_temp.jpg"));
|
||||
|
||||
ChartControl druckChart = getGraph(struktures, "Druck");
|
||||
if (druckChart == null) return false;
|
||||
else
|
||||
druckChart.SaveImage(Path.Combine(destinationPath, "linerGraph_druck.jpg"));
|
||||
|
||||
ChartControl speedChart = getGraph(struktures, "Geschwindigkeit");
|
||||
if (speedChart == null) return false;
|
||||
else
|
||||
speedChart.SaveImage(Path.Combine(destinationPath, "linerGraph_speed.jpg"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
9
SanSystem/CSVParser/AcceptedCSVFormats.cs
Normal file
9
SanSystem/CSVParser/AcceptedCSVFormats.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace CSVParser
|
||||
{
|
||||
public enum AcceptedCSVFormats
|
||||
{
|
||||
UVRELINING,
|
||||
BLUELIGHT
|
||||
|
||||
}
|
||||
}
|
||||
73
SanSystem/CSVParser/BlueLight.cs
Normal file
73
SanSystem/CSVParser/BlueLight.cs
Normal file
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SanShared;
|
||||
using SanShared.Exceptions;
|
||||
|
||||
namespace CSVParser
|
||||
{
|
||||
public class BlueLight : CSVParser
|
||||
{
|
||||
public BlueLight(string csvFile) : base(csvFile)
|
||||
{
|
||||
}
|
||||
|
||||
public override List<UVcsvStrukture> ReadCSVStrukture()
|
||||
{
|
||||
List<UVcsvStrukture> result = new List<UVcsvStrukture>();
|
||||
DateTime zeit;
|
||||
double temperatur;
|
||||
double druck;
|
||||
double geschwindigkeit;
|
||||
|
||||
|
||||
bool gestarted = false;
|
||||
foreach (string partial in Input)
|
||||
{
|
||||
UVcsvStrukture strukture = new UVcsvStrukture();
|
||||
string[] parts = partial.Split(',');
|
||||
|
||||
string datum = parts[1].Replace("\"", "");
|
||||
string uhrzeit = parts[2].Replace("\"", "");
|
||||
|
||||
if (datum.Equals("Date")) continue;
|
||||
|
||||
|
||||
if (!DateTime.TryParse(datum + " " + uhrzeit, out zeit))
|
||||
throw new CSVImportException("Konnte die datum uhrzeit nicht konventieren");
|
||||
|
||||
double.TryParse(parts[3].Replace("\"","").Replace('.', ','), out temperatur);
|
||||
double.TryParse(parts[4].Replace("\"",""), out geschwindigkeit);
|
||||
double.TryParse(parts[5].Replace("\"","").Replace('.', ','), out druck);
|
||||
|
||||
|
||||
string x = (druck*1000).ToString();
|
||||
|
||||
if (geschwindigkeit > 100) geschwindigkeit = 0;
|
||||
if (geschwindigkeit > 50) geschwindigkeit = 1;
|
||||
/*
|
||||
*
|
||||
* Geschwindigkeit wird in Meter angegeben pro stunde
|
||||
* : 60 :60 * 100 = 36;
|
||||
*/
|
||||
geschwindigkeit = geschwindigkeit / 36.00;
|
||||
|
||||
strukture.Zeitstempel = zeit;
|
||||
strukture.Druck = int.Parse(x);
|
||||
strukture.Geschwindigkeit = geschwindigkeit;
|
||||
strukture.Temperatur = temperatur;
|
||||
|
||||
if (!geschwindigkeit.Equals(0) && gestarted.Equals(false))
|
||||
gestarted = true;
|
||||
|
||||
if(gestarted == true)
|
||||
result.Add(strukture);
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
28
SanSystem/CSVParser/CSVParser.cs
Normal file
28
SanSystem/CSVParser/CSVParser.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using SanShared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CSVParser
|
||||
{
|
||||
public abstract class CSVParser : IReadCSVData
|
||||
{
|
||||
private string csvFile;
|
||||
public CSVParser(string csvFile)
|
||||
{
|
||||
this.csvFile = csvFile;
|
||||
}
|
||||
public virtual string[] Input
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!File.Exists(csvFile)) throw new FileNotFoundException(csvFile);
|
||||
return File.ReadAllLines(csvFile);
|
||||
}
|
||||
}
|
||||
public abstract List<UVcsvStrukture> ReadCSVStrukture();
|
||||
}
|
||||
}
|
||||
25
SanSystem/CSVParser/CsvParserFactory.cs
Normal file
25
SanSystem/CSVParser/CsvParserFactory.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SanShared;
|
||||
|
||||
namespace CSVParser
|
||||
{
|
||||
public static class CsvParserFactory
|
||||
{
|
||||
public static IReadCSVData ReadCSVFile(AcceptedCSVFormats csvFormat, string csvFile)
|
||||
{
|
||||
switch (csvFormat)
|
||||
{
|
||||
case AcceptedCSVFormats.UVRELINING:
|
||||
return new UVRelining(csvFile);
|
||||
case AcceptedCSVFormats.BLUELIGHT:
|
||||
return new BlueLight(csvFile);
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(csvFormat));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
56
SanSystem/CSVParser/UVRelining.cs
Normal file
56
SanSystem/CSVParser/UVRelining.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using SanShared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CSVParser
|
||||
{
|
||||
public class UVRelining : CSVParser
|
||||
{
|
||||
public UVRelining(string csvFile) : base(csvFile)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="csvFile"></param>
|
||||
/// <returns></returns>
|
||||
public override List<UVcsvStrukture> ReadCSVStrukture()
|
||||
{
|
||||
/*
|
||||
* Die Geschwindigkeit wird in cm / sekunde angegeben
|
||||
*/
|
||||
List<UVcsvStrukture> result = new List<UVcsvStrukture>();
|
||||
|
||||
DateTime zeit;
|
||||
double temperatur;
|
||||
double druck;
|
||||
int geschwindigkeit;
|
||||
foreach (string pars in Input)
|
||||
{
|
||||
UVcsvStrukture uVcsvStrukture = new UVcsvStrukture();
|
||||
string[] parts = pars.Split(',');
|
||||
if (
|
||||
parts[0].Equals("Group1") ||
|
||||
parts[1].Equals("(END)") ||
|
||||
parts[1].Equals("(START)")
|
||||
) continue;
|
||||
DateTime.TryParse(parts[0], out zeit);
|
||||
double.TryParse(parts[1].Replace('.', ','), out temperatur);
|
||||
double.TryParse(parts[2].Replace('.', ','), out druck);
|
||||
int.TryParse(parts[3], out geschwindigkeit);
|
||||
|
||||
|
||||
uVcsvStrukture.Zeitstempel = zeit;
|
||||
uVcsvStrukture.Druck = 1;//druck;
|
||||
uVcsvStrukture.Temperatur = temperatur;
|
||||
uVcsvStrukture.Geschwindigkeit = geschwindigkeit;
|
||||
result.Add(uVcsvStrukture);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
89
SanSystem/Database/Datenbank.cs
Normal file
89
SanSystem/Database/Datenbank.cs
Normal file
@@ -0,0 +1,89 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xaml;
|
||||
using System.IO.Compression;
|
||||
using System.Diagnostics;
|
||||
using KlassenBIB;
|
||||
using SanShared.Exceptions;
|
||||
|
||||
namespace Database
|
||||
{
|
||||
public class Datenbank
|
||||
{
|
||||
public string pfad;
|
||||
public string projekt;
|
||||
public static readonly Datenbank instance = new Datenbank();
|
||||
public static Datenbank Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
public void Init()
|
||||
{
|
||||
TeufelDB = new KlassenBIB.DB();
|
||||
string filepath = "";
|
||||
filepath = Path.Combine(pfad, "projekte", "TeufelDB.xaml");
|
||||
|
||||
if(!Directory.Exists(Path.Combine(pfad,"projekte")))
|
||||
{
|
||||
Directory.CreateDirectory(Path.Combine(pfad, "projekte"));
|
||||
return;
|
||||
}
|
||||
if (File.Exists(filepath))
|
||||
TeufelDB = XamlServices.Load(filepath) as KlassenBIB.DB;
|
||||
}
|
||||
|
||||
public KlassenBIB.Projekt loadedProjekt = null;
|
||||
//public KlassenBIB.MainDataBase MainDatenbank = null;
|
||||
public KlassenBIB.DB TeufelDB = null;
|
||||
|
||||
public Datenbank()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private string projektpfad = string.Empty;
|
||||
public bool LoadProjekt(string projekt)
|
||||
{
|
||||
this.projekt = projekt;
|
||||
loadedProjekt = Datenbank.Instance.TeufelDB.Projekte.Find(x => x.Nummer != null && x.Nummer.Equals(projekt));
|
||||
|
||||
string filepath = Path.Combine(pfad, "projekte", "TeufelDB.xaml");
|
||||
if (!File.Exists(filepath))
|
||||
{
|
||||
if (!Directory.Exists("./projekte")) return true;
|
||||
UpdateDatabase.UpdateNewGuids();
|
||||
|
||||
UpdateDatabase.TransferAuftraggeber();
|
||||
UpdateDatabase.MakeNewDatabaseSystem();
|
||||
} else
|
||||
{
|
||||
//UpdateDatabase.GenerateNewBeziehungen();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool InitProjekt(Projekt projekt,string projektpfad)
|
||||
{
|
||||
this.projektpfad = Path.Combine(projektpfad,string.Format("{0}.xaml",projekt.Nummer));
|
||||
loadedProjekt = projekt;
|
||||
SaveProjekt();
|
||||
return true;
|
||||
}
|
||||
|
||||
public void SaveProjekt()
|
||||
{
|
||||
string filepath = Path.Combine(pfad, "projekte", "TeufelDB.xaml");
|
||||
Trace.WriteLine(filepath);
|
||||
XamlServices.Save(filepath, TeufelDB);
|
||||
}
|
||||
}
|
||||
}
|
||||
124
SanSystem/Database/UpdateDatabase.cs
Normal file
124
SanSystem/Database/UpdateDatabase.cs
Normal file
@@ -0,0 +1,124 @@
|
||||
using KlassenBIB;
|
||||
using SanShared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xaml;
|
||||
|
||||
namespace Database
|
||||
{
|
||||
class UpdateDatabase
|
||||
{
|
||||
public static void UpdateNewGuids()
|
||||
{
|
||||
if (Datenbank.Instance.loadedProjekt == null) return;
|
||||
foreach(var entries in Datenbank.Instance.loadedProjekt.Objekte)
|
||||
{
|
||||
|
||||
if(entries.Guid.Equals(Guid.Empty))
|
||||
entries.Guid = Guid.NewGuid();
|
||||
|
||||
|
||||
foreach(var sanierungen in entries.Sanierung)
|
||||
{
|
||||
if (sanierungen.Guid.Equals(Guid.Empty))
|
||||
sanierungen.Guid = Guid.NewGuid();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void MakeNewDatabaseSystem()
|
||||
{
|
||||
List<string> projekte = new List<string>();
|
||||
|
||||
Projekt tempProjekt = null;
|
||||
foreach (DirectoryInfo projekt in (new DirectoryInfo("./projekte").GetDirectories()))
|
||||
{
|
||||
projekte.Add(projekt.Name);
|
||||
}
|
||||
|
||||
foreach (string t in projekte)
|
||||
{
|
||||
string filepath = Path.Combine("projekte", t, string.Format("{0}.xaml", t));
|
||||
if (!File.Exists(filepath)) continue;
|
||||
tempProjekt = XamlServices.Load(filepath) as KlassenBIB.Projekt;
|
||||
Datenbank.Instance.TeufelDB.Projekte.Add(tempProjekt);
|
||||
|
||||
//var x = Datenbank.Instance.MainDatenbank.AuftraggeberListe;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void GenerateNewBeziehungen()
|
||||
{
|
||||
string imprägnierungsnummer = "";
|
||||
foreach(Projekt projekt in Datenbank.Instance.TeufelDB.Projekte)
|
||||
{
|
||||
projekt.Auftraggeber = Datenbank.Instance.TeufelDB.Auftraggeber.Find(x => x.Name.Equals(projekt.Auftraggeber.Name));
|
||||
foreach(Inspektionsobjekt inspektionsobjekt in projekt.Objekte)
|
||||
{
|
||||
if(inspektionsobjekt.Sanierung.Count > 0)
|
||||
{
|
||||
foreach(var sanierung in inspektionsobjekt.Sanierung)
|
||||
{
|
||||
if(sanierung is KlassenBIB.InlinerSanierung)
|
||||
{
|
||||
KlassenBIB.InlinerSanierung san = (sanierung as KlassenBIB.InlinerSanierung);
|
||||
if (!(san.Imprägnierungsbericht is KlassenBIB.WerkseitigImprägniert)) continue;
|
||||
KlassenBIB.WerkseitigImprägniert werkseitigImprägniert = (KlassenBIB.WerkseitigImprägniert)san.Imprägnierungsbericht;
|
||||
imprägnierungsnummer = werkseitigImprägniert.Imprägniernummer;
|
||||
//san.Imprägnierungsbericht = null;
|
||||
san.Imprägnierungsbericht = Datenbank.Instance.TeufelDB.Imprägnierungen.Find(x => x.Imprägniernummer.Equals(imprägnierungsnummer));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Debugger.Break();
|
||||
}
|
||||
|
||||
public static void TransferAuftraggeber()
|
||||
{
|
||||
/*
|
||||
List<string> projekte = new List<string>();
|
||||
List<IAuftraggeber> auftraggebers = new List<IAuftraggeber>();
|
||||
Projekt tempProjekt = null;
|
||||
foreach(DirectoryInfo projekt in (new DirectoryInfo("./projekte").GetDirectories()))
|
||||
{
|
||||
projekte.Add(projekt.Name);
|
||||
}
|
||||
|
||||
foreach(string t in projekte)
|
||||
{
|
||||
string filepath = Path.Combine("projekte", t, string.Format("{0}.xaml", t));
|
||||
if (!File.Exists(filepath)) continue;
|
||||
tempProjekt = XamlServices.Load(filepath) as KlassenBIB.Projekt;
|
||||
|
||||
//auftraggebers.Add(tempProjekt.Auftraggeber);
|
||||
if (tempProjekt.Auftraggeber.Name == null && tempProjekt.Auftraggeber.Ort == null && tempProjekt.Auftraggeber.Ansprechpartner == null) continue;
|
||||
IAuftraggeber test = Datenbank.Instance.MainDatenbank.AuftraggeberListe.Find(x =>x.Name.Equals(tempProjekt.Auftraggeber.Name));
|
||||
if (test != null)
|
||||
{
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
Datenbank.Instance.MainDatenbank.AuftraggeberListe.Add(tempProjekt.Auftraggeber);
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
37
SanSystem/KlassenBIB/Auftraggeber.cs
Normal file
37
SanSystem/KlassenBIB/Auftraggeber.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using SanShared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Auftraggeber :IAuftraggeber
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Strasse { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Ort { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Ansprechpartner { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} / {1}", Name, Ansprechpartner);
|
||||
}
|
||||
}
|
||||
}
|
||||
31
SanSystem/KlassenBIB/AusgefuehrteTaetigkeiten.cs
Normal file
31
SanSystem/KlassenBIB/AusgefuehrteTaetigkeiten.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class AusgefuehrteTaetigkeiten
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime Datum { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public LeistungsVerzeichnis Leistungsverzeichnis { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal Menge { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal Station { get; set; }
|
||||
}
|
||||
}
|
||||
12
SanSystem/KlassenBIB/Collections/AbwasserTechnischeAnlage.cs
Normal file
12
SanSystem/KlassenBIB/Collections/AbwasserTechnischeAnlage.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB.Collections
|
||||
{
|
||||
public class AbwasserTechnischeAnlage : List<Inspektionsobjekt>
|
||||
{
|
||||
}
|
||||
}
|
||||
13
SanSystem/KlassenBIB/Collections/AuftraggeberList.cs
Normal file
13
SanSystem/KlassenBIB/Collections/AuftraggeberList.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using SanShared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB.Collections
|
||||
{
|
||||
public class AuftraggeberList : List<IAuftraggeber>
|
||||
{
|
||||
}
|
||||
}
|
||||
12
SanSystem/KlassenBIB/Collections/AusgefuehrteTaetigkeiten.cs
Normal file
12
SanSystem/KlassenBIB/Collections/AusgefuehrteTaetigkeiten.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB.Collections
|
||||
{
|
||||
public class AusgefuehrteTaetigkeiten : List<KlassenBIB.AusgefuehrteTaetigkeiten>
|
||||
{
|
||||
}
|
||||
}
|
||||
12
SanSystem/KlassenBIB/Collections/Bilder.cs
Normal file
12
SanSystem/KlassenBIB/Collections/Bilder.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB.Collections
|
||||
{
|
||||
public class Bilder : List<SavedBilder>
|
||||
{
|
||||
}
|
||||
}
|
||||
12
SanSystem/KlassenBIB/Collections/ChargeNummer.cs
Normal file
12
SanSystem/KlassenBIB/Collections/ChargeNummer.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
public class ChargeNummerCollection : List<StructChargeNummern>
|
||||
{
|
||||
}
|
||||
}
|
||||
12
SanSystem/KlassenBIB/Collections/ImprägnierBericht.cs
Normal file
12
SanSystem/KlassenBIB/Collections/ImprägnierBericht.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB.Collections
|
||||
{
|
||||
public class ImprägnierBericht : List<WerkseitigImprägniert>
|
||||
{
|
||||
}
|
||||
}
|
||||
14
SanSystem/KlassenBIB/Collections/Inspektionskuerzeln.cs
Normal file
14
SanSystem/KlassenBIB/Collections/Inspektionskuerzeln.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB.Collections
|
||||
{
|
||||
[Browsable(false)]
|
||||
public class Inspektionskuerzeln : List<KlassenBIB.Inspektionskuerzeln>
|
||||
{
|
||||
}
|
||||
}
|
||||
12
SanSystem/KlassenBIB/Collections/Leistungsverzeichnis.cs
Normal file
12
SanSystem/KlassenBIB/Collections/Leistungsverzeichnis.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB.Collections
|
||||
{
|
||||
public class Leistungsverzeichnis : List<LeistungsVerzeichnis>
|
||||
{
|
||||
}
|
||||
}
|
||||
12
SanSystem/KlassenBIB/Collections/Projekte.cs
Normal file
12
SanSystem/KlassenBIB/Collections/Projekte.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB.Collections
|
||||
{
|
||||
public class Projekte : List<Projekt>
|
||||
{
|
||||
}
|
||||
}
|
||||
12
SanSystem/KlassenBIB/Collections/Sanierung.cs
Normal file
12
SanSystem/KlassenBIB/Collections/Sanierung.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB.Collections
|
||||
{
|
||||
public class Sanierung : List<KlassenBIB.Sanierung>
|
||||
{
|
||||
}
|
||||
}
|
||||
12
SanSystem/KlassenBIB/Collections/Sanierungskonzept.cs
Normal file
12
SanSystem/KlassenBIB/Collections/Sanierungskonzept.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB.Collections
|
||||
{
|
||||
public class Sanierungskonzept : List<KlassenBIB.Sanierungskonzept>
|
||||
{
|
||||
}
|
||||
}
|
||||
26
SanSystem/KlassenBIB/DB.cs
Normal file
26
SanSystem/KlassenBIB/DB.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
public class DB
|
||||
{
|
||||
public int DatabaseVersion { get; set; }
|
||||
public Collections.Projekte Projekte { get; set; }
|
||||
public Collections.AuftraggeberList Auftraggeber { get; set; }
|
||||
public Collections.ImprägnierBericht Imprägnierungen { get; set; }
|
||||
|
||||
|
||||
|
||||
public DB()
|
||||
{
|
||||
DatabaseVersion = 1;
|
||||
Projekte = new Collections.Projekte();
|
||||
Auftraggeber = new Collections.AuftraggeberList();
|
||||
Imprägnierungen = new Collections.ImprägnierBericht();
|
||||
}
|
||||
}
|
||||
}
|
||||
28
SanSystem/KlassenBIB/IImportedObjekte.cs
Normal file
28
SanSystem/KlassenBIB/IImportedObjekte.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface zur Import von Daten
|
||||
/// </summary>
|
||||
public interface IImportedObjekte
|
||||
{
|
||||
/// <summary>
|
||||
/// Angaben zur XMLDatei die importiert werden soll
|
||||
/// </summary>
|
||||
string XMLFile { get; set; }
|
||||
/// <summary>
|
||||
/// Angaben zur Projektnummern die eingetragen werden soll in die Objekte
|
||||
/// </summary>
|
||||
string Projektnummer { get; set; }
|
||||
/// <summary>
|
||||
/// Funktion der die Inspektionsobjekte übergibt
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
List<Inspektionsobjekt> GetInspektionsobjekte();
|
||||
}
|
||||
}
|
||||
42
SanSystem/KlassenBIB/Inspektionskuerzeln.cs
Normal file
42
SanSystem/KlassenBIB/Inspektionskuerzeln.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Inspektionskuerzeln
|
||||
{
|
||||
|
||||
public decimal Station { get; set; }
|
||||
|
||||
public string Hauptkode { get; set; }
|
||||
|
||||
public string Charakterisierung1 { get; set; }
|
||||
|
||||
public string Charakterisierung2 { get; set; }
|
||||
|
||||
public uint Quantifizierung1 { get; set; }
|
||||
|
||||
public uint Quantifizierung2 { get; set; }
|
||||
|
||||
public uint LageAmUmfangStart { get; set; }
|
||||
|
||||
public uint LageAmUmfangEnde { get; set; }
|
||||
|
||||
public bool ImVerbindung { get; set; }
|
||||
|
||||
public string FotoReferenz { get; set; }
|
||||
|
||||
public string VideoReferenz { get; set; }
|
||||
|
||||
public string Anmerkung { get; set; }
|
||||
|
||||
public Collections.Sanierungskonzept Sanierungskonzepts { get; set; }
|
||||
}
|
||||
}
|
||||
68
SanSystem/KlassenBIB/Inspektionsobjekt.cs
Normal file
68
SanSystem/KlassenBIB/Inspektionsobjekt.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using SanShared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[ContentProperty("Sanierung")]
|
||||
public class Inspektionsobjekt : IInspektionsobjekt
|
||||
{
|
||||
private string strasseName = "none";
|
||||
|
||||
public IAuftraggeber OverrideAuftraggeber { get; set; }
|
||||
public bool GeschlossenesEnde { get; set; }
|
||||
|
||||
public string StrasseName { get => strasseName; set => strasseName = value; }
|
||||
|
||||
public string OrtName { get; set; }
|
||||
|
||||
public string Hausnummer { get; set; }
|
||||
|
||||
public string Projektnummer { get; set; }
|
||||
|
||||
public string Objektbezeichnung { get; set; }
|
||||
|
||||
public string VonPunkt { get; set; }
|
||||
|
||||
public string BisPunkt { get; set; }
|
||||
|
||||
public string RohrMaterial { get; set; }
|
||||
|
||||
public uint Kanalrohrweite { get; set; }
|
||||
|
||||
public double Haltungslaenge { get; set; }
|
||||
|
||||
public double Schachtlaenge { get; set; }
|
||||
|
||||
public DateTime HaltungGemessen { get; set; }
|
||||
|
||||
public Collections.Inspektionskuerzeln Schadenskuerzeln { get; set; }
|
||||
|
||||
public string Bemerkung { get; set; }
|
||||
|
||||
public Collections.Sanierung Sanierung { get;set; }
|
||||
|
||||
public Collections.AusgefuehrteTaetigkeiten AusgefuehrteTaetigkeiten { get; set; }
|
||||
|
||||
public string Inspektionsrichtung { get; set; }
|
||||
|
||||
public string Sanierungsnummer { get; set; }
|
||||
|
||||
public Guid Guid { get; set; }
|
||||
|
||||
public Inspektionsobjekt()
|
||||
{
|
||||
Schadenskuerzeln = new Collections.Inspektionskuerzeln();
|
||||
Sanierung = new Collections.Sanierung();
|
||||
AusgefuehrteTaetigkeiten = new Collections.AusgefuehrteTaetigkeiten();
|
||||
if (HaltungGemessen <= DateTime.MinValue || HaltungGemessen >= DateTime.MaxValue) HaltungGemessen = DateTime.Now;
|
||||
}
|
||||
}
|
||||
}
|
||||
35
SanSystem/KlassenBIB/LeistungsVerzeichnis.cs
Normal file
35
SanSystem/KlassenBIB/LeistungsVerzeichnis.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LeistungsVerzeichnis
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string PositionsNummer { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string PositionsBeschreibung { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string PositionsEinheit { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override string ToString()
|
||||
{
|
||||
return PositionsBeschreibung;
|
||||
}
|
||||
}
|
||||
}
|
||||
15
SanSystem/KlassenBIB/Lieferschein.cs
Normal file
15
SanSystem/KlassenBIB/Lieferschein.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Lieferschein
|
||||
{
|
||||
}
|
||||
}
|
||||
41
SanSystem/KlassenBIB/LinerChargen.cs
Normal file
41
SanSystem/KlassenBIB/LinerChargen.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
public static class LinerChargen
|
||||
{
|
||||
public static Dictionary<string, List<string>> GenLinerChargenOverview(List<Projekt> ProjektListe)
|
||||
{
|
||||
Dictionary<string, List<string>> Daten = new Dictionary<string, List<string>>();
|
||||
foreach(Projekt projekt in ProjektListe)
|
||||
{
|
||||
foreach(Inspektionsobjekt objekt in projekt.Objekte)
|
||||
{
|
||||
foreach(Sanierung sanierung in objekt.Sanierung)
|
||||
{
|
||||
if (!(sanierung is InlinerSanierung)) continue;
|
||||
|
||||
if (!((sanierung as InlinerSanierung).Imprägnierungsbericht is WerkseitigImprägniert)) continue;
|
||||
|
||||
WerkseitigImprägniert imprignierung = ((sanierung as InlinerSanierung).Imprägnierungsbericht as WerkseitigImprägniert);
|
||||
string datenbezeichnung = projekt.Nummer + " # " + objekt.Objektbezeichnung;
|
||||
if (Daten.ContainsKey(imprignierung.Imprägniernummer))
|
||||
{
|
||||
Daten[imprignierung.Imprägniernummer].Add(datenbezeichnung);
|
||||
}
|
||||
else
|
||||
{
|
||||
Daten.Add(imprignierung.Imprägniernummer, new List<string>() { datenbezeichnung });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return Daten;
|
||||
}
|
||||
}
|
||||
}
|
||||
32
SanSystem/KlassenBIB/Projekt.cs
Normal file
32
SanSystem/KlassenBIB/Projekt.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using SanShared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Markup;
|
||||
|
||||
[assembly: XmlnsDefinition("http://schemas.cosysda.de/sanVerwaltung/xaml","KlassenBIB")]
|
||||
namespace KlassenBIB
|
||||
{
|
||||
[ContentProperty("Objekte")]
|
||||
public class Projekt :IProjekt
|
||||
{
|
||||
public string Nummer { get; set; }
|
||||
public string Ort { get; set; }
|
||||
public IAuftraggeber Auftraggeber { get; set; }
|
||||
public Collections.Leistungsverzeichnis Leistungsverzeichnis { get; set; }
|
||||
public Collections.AbwasserTechnischeAnlage Objekte { get; set; }
|
||||
public string SanierungsIDPrefix { get; set; }
|
||||
public string SanierungsIDSuffix { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Projekt()
|
||||
{
|
||||
Objekte = new Collections.AbwasserTechnischeAnlage();
|
||||
Leistungsverzeichnis = new Collections.Leistungsverzeichnis();
|
||||
Auftraggeber = new Auftraggeber();
|
||||
}
|
||||
}
|
||||
}
|
||||
28
SanSystem/KlassenBIB/Sanierung/AbstractSanieren.cs
Normal file
28
SanSystem/KlassenBIB/Sanierung/AbstractSanieren.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
public abstract class AbstractSanieren : Sanierung
|
||||
{
|
||||
|
||||
DateTime datum = new DateTime();
|
||||
bool fertig = false;
|
||||
string verzeichnispfad;
|
||||
/// <summary>
|
||||
/// Dient zum Überschreiben
|
||||
/// </summary>
|
||||
DateTime offset;
|
||||
|
||||
#region getSeters
|
||||
public string Besatzung { get; set; }
|
||||
public DateTime Datum { get => datum; set => datum = value; }
|
||||
public bool Fertig { get => fertig; set => fertig = value; }
|
||||
public string Verzeichnispfad { get => verzeichnispfad; protected set => verzeichnispfad = value; }
|
||||
public DateTime Offset { get => offset; set => offset = value; }
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
public abstract class AbstractImprägnier
|
||||
{
|
||||
public string Schlauchnummer { get; set; }
|
||||
public ImprägnierungStrukture ImprägnierungBeginn { get; set; }
|
||||
public ImprägnierungStrukture ImprägnierungEnde { get; set; }
|
||||
public string ImprägnierDatum
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ImprägnierungBeginn == null) return "Nicht definiert";
|
||||
return ImprägnierungBeginn.Zeitstempel.ToShortDateString();
|
||||
}
|
||||
}
|
||||
public uint DN { get; set; }
|
||||
public double Wanddicke { get; set; }
|
||||
public double Länge { get; set; }
|
||||
public double Harzmenge { get; set; }
|
||||
public string Bediener { get; set; }
|
||||
public double HarzTemperatur { get; set; }
|
||||
public double Vakuum { get; set; }
|
||||
public string HarzTyp { get; set; }
|
||||
public double Walzenabstand { get; set; }
|
||||
public bool NochVorhanden { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
public class ImprägnierungStrukture
|
||||
{
|
||||
public DateTime Zeitstempel { get; set; }
|
||||
public double Temperature { get; set; }
|
||||
}
|
||||
}
|
||||
343
SanSystem/KlassenBIB/Sanierung/Renovation/InlinerSanierung.cs
Normal file
343
SanSystem/KlassenBIB/Sanierung/Renovation/InlinerSanierung.cs
Normal file
@@ -0,0 +1,343 @@
|
||||
using BerichtGen;
|
||||
using CSVParser;
|
||||
using SanShared;
|
||||
using SanShared.Exceptions;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
/// Inliner class
|
||||
///
|
||||
/// </summary>
|
||||
public sealed class InlinerSanierung : AbstractSanieren, IMakeProtokol
|
||||
{
|
||||
double kalibrierUnterdruck = -0.5;
|
||||
double kalibierWalzenAbstand = 0.9;
|
||||
double harzKalibrierTemperatur;
|
||||
DateTime datumKalibrierung;
|
||||
string harzChargenummer;
|
||||
string linerChargenummer;
|
||||
string harzTyp;
|
||||
string linerTyp;
|
||||
double harzbedarf = 1.8;
|
||||
uint rueckholgeschwindigkeit;
|
||||
bool geschlosseneEnde = false; // Todo Rausschmeißen
|
||||
bool preliner = false;
|
||||
int lagerungTemperatur;
|
||||
int temperaturEinbau;
|
||||
double inversionsDruck;
|
||||
DateTime anfangAushaertung;
|
||||
DateTime endeAushaertung;
|
||||
string ort;
|
||||
string bediener;
|
||||
DateTime anfangKalibrierung;
|
||||
DateTime endeKalibirierung;
|
||||
AbstractImprägnier imprägnierungsbericht;
|
||||
|
||||
Dictionary<int, TimeSpan> lagerungZeiten = new Dictionary<int, TimeSpan>();
|
||||
|
||||
|
||||
public double GetGesamtHarzbedarf(double haltungslaenge)
|
||||
{
|
||||
return haltungslaenge * harzbedarf;
|
||||
}
|
||||
|
||||
public override string CheckVerzeichnisse(string projektpfad)
|
||||
{
|
||||
string path = Path.Combine(projektpfad, PfadZurSan);
|
||||
if (!Directory.Exists(path)) Directory.CreateDirectory(path);
|
||||
|
||||
//string mypath = Path.Combine(path, Verzeichnispfad);
|
||||
//if (!Directory.Exists(mypath)) Directory.CreateDirectory(mypath);
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
public Hashtable MakeProtokoll(string destinationPath, IProjekt projekt, DateTime offset)
|
||||
{
|
||||
IEnumerable<string> files = Directory.EnumerateFiles(destinationPath, "*.csv", SearchOption.AllDirectories);
|
||||
IAuftraggeber auftraggeber = null;
|
||||
|
||||
if (Inspektionsobjekt.OverrideAuftraggeber == null)
|
||||
auftraggeber = projekt.Auftraggeber;
|
||||
else
|
||||
auftraggeber = Inspektionsobjekt.OverrideAuftraggeber;
|
||||
|
||||
IReadCSVData csvFile = null;
|
||||
List<UVcsvStrukture> struktures = null;
|
||||
if (files.Count() > 0)
|
||||
{
|
||||
csvFile = CsvParserFactory.ReadCSVFile(AcceptedCSVFormats.BLUELIGHT, files.Last());
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
struktures = csvFile.ReadCSVStrukture();
|
||||
}
|
||||
catch (CSVImportException)
|
||||
{
|
||||
//MessageBox.Show("Es scheint den Falschen Anlagentyp angegeben worden sein.", "CSV Datei konnte nicht gelesen werden", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
//return false;
|
||||
}
|
||||
|
||||
this.AnfangAushaertung = struktures.Select(x => x.Zeitstempel).Min();
|
||||
this.EndeAushaertung = struktures.Select(x => x.Zeitstempel).Max();
|
||||
if (!(offset == DateTime.MinValue))
|
||||
{
|
||||
TimeSpan duration = EndeAushaertung.Subtract(AnfangAushaertung);
|
||||
AnfangAushaertung = offset;
|
||||
EndeAushaertung = AnfangAushaertung.Add(duration);
|
||||
}
|
||||
this.Rueckholgeschwindigkeit = 0;
|
||||
}
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
//Trace.WriteLine(ex.Message);
|
||||
//MessageBox.Show(string.Format("Datei {0} wurde nicht gefunden", ex.FileName));
|
||||
}
|
||||
}
|
||||
if (struktures != null)
|
||||
{
|
||||
makeGraphic.GetGraphics(struktures, destinationPath);
|
||||
|
||||
}
|
||||
|
||||
Hashtable grunddaten = new Hashtable()
|
||||
{
|
||||
{"AG_Vorname","" },
|
||||
{"hausnummer","" },
|
||||
{"KLP_Nummer","" },
|
||||
{"KLP_Datum","" },
|
||||
{"AG_Ort","" },
|
||||
{"AG_Strasse","" },
|
||||
{"AG_Ansprechpartner","" },
|
||||
{"BM_Ort","" },
|
||||
{"BM_Strasse","" },
|
||||
{"BM_Schacht_von","" },
|
||||
{"BM_Schacht_bis","" },
|
||||
{"BM_Haltungsmat","" },
|
||||
{"BM_Haltung_DN","" },
|
||||
{"BM_Haltunglaenge","" },
|
||||
{ "KL_Wetter","" },
|
||||
{ "Temp_Aussen","" },
|
||||
{ "KL_Temp_Kanal","" },
|
||||
{ "KL_Gen","" },
|
||||
{ "KL_WH","" },
|
||||
{ "KL_STVO","" },
|
||||
{ "KL_HD_true","" },
|
||||
{ "KL_mech_true","" },
|
||||
{ "KL_rob_true","" },
|
||||
{ "KL_HD_date","" },
|
||||
{ "KL_Besatzung", "" },
|
||||
{"liner_laenge","" },
|
||||
{"Charge_Liner","" },
|
||||
{"Charge_Harz","" },
|
||||
{"harz_bedarf_m","" },
|
||||
{"gesamt_harz","" },
|
||||
{"temperatur_harz","" },
|
||||
{"datum_kalibrierung","" },
|
||||
{"walzen_abstand","" },
|
||||
{"vakuum","" },
|
||||
{"time_start","" },
|
||||
{"time_ende","" },
|
||||
{"UVImageTemp","" },
|
||||
{"UVImageDruck","" },
|
||||
{"UVImageSpeed","" },
|
||||
{"liner_type","" },
|
||||
{"rueckhol_speed","" },
|
||||
{"harz_type","" },
|
||||
{"preliner_verwendet","" },
|
||||
{"geschlossene_ende","" },
|
||||
{"schlauch_dn","" },
|
||||
{"TV_Kontrolle","" },
|
||||
{"Einbau_Temperatur","" },
|
||||
{"Inversion_Druck","" },
|
||||
{"Lagerung_Text","" },
|
||||
{"Lagerung_Temp","" },
|
||||
{"Projekt_NR","" }
|
||||
};
|
||||
|
||||
double LaengeGesamt = this.Inspektionsobjekt.Haltungslaenge + this.Inspektionsobjekt.Schachtlaenge;
|
||||
|
||||
string KLP_Nummer = Inspektionsobjekt.Sanierungsnummer;
|
||||
if (projekt.SanierungsIDPrefix != string.Empty)
|
||||
KLP_Nummer = string.Format("{0}{1}", KLP_Nummer, projekt.SanierungsIDPrefix);
|
||||
if (projekt.SanierungsIDSuffix != string.Empty)
|
||||
KLP_Nummer = string.Format("{0}{1}", projekt.SanierungsIDSuffix,KLP_Nummer);
|
||||
|
||||
if (auftraggeber != null)
|
||||
{
|
||||
grunddaten["AG_Vorname"] = auftraggeber.Name;
|
||||
grunddaten["AG_Ort"] = auftraggeber.Ort;
|
||||
grunddaten["AG_Strasse"] = auftraggeber.Strasse;
|
||||
grunddaten["AG_Ansprechpartner"] = auftraggeber.Ansprechpartner;
|
||||
}
|
||||
grunddaten["hausnummer"] = Inspektionsobjekt.Hausnummer;
|
||||
|
||||
grunddaten["KLP_Nummer"] = KLP_Nummer;
|
||||
grunddaten["KLP_Datum"] = this.Datum.ToShortDateString();
|
||||
grunddaten["BM_Ort"] = Inspektionsobjekt.OrtName;
|
||||
grunddaten["BM_Strasse"] = Inspektionsobjekt.StrasseName;
|
||||
grunddaten["BM_Schacht_von"] = Inspektionsobjekt.VonPunkt;
|
||||
grunddaten["BM_Schacht_bis"] = Inspektionsobjekt.BisPunkt ;
|
||||
grunddaten["BM_Haltungsmat"] = Inspektionsobjekt.RohrMaterial;
|
||||
grunddaten["BM_Haltung_DN"] = Inspektionsobjekt.Kanalrohrweite;
|
||||
grunddaten["BM_Haltunglaenge"] = Inspektionsobjekt.Haltungslaenge;
|
||||
grunddaten["KL_Wetter"] = this.Wetter;
|
||||
grunddaten["Temp_Aussen"] = this.TempAusen;
|
||||
grunddaten["KL_Temp_Kanal"] = this.TempKanal;
|
||||
grunddaten["KL_Gen"] = this.GenehmigungVorhanden ? "ja" : "nein";
|
||||
grunddaten["KL_WH"] = this.WasserhaltungEingerichtet ? "ja" : "nein";
|
||||
grunddaten["KL_STVO"] = this.STVOAbsicherung ? "ja" : "nein";
|
||||
grunddaten["KL_HD_true"] = this.HDReinigung ? "X" : " ";
|
||||
grunddaten["KL_mech_true"] = this.VorbereitetMechanisch ? "X": " ";
|
||||
grunddaten["KL_rob_true"] = this.VorbereitetRoboter ? "X": " ";
|
||||
grunddaten["KL_HD_date"] = this.Datum.ToShortDateString();
|
||||
grunddaten["KL_Besatzung"] = this.Besatzung;
|
||||
grunddaten["liner_laenge"] = Inspektionsobjekt.Haltungslaenge; //LaengeGesamt;
|
||||
grunddaten["Charge_Liner"] = this.imprägnierungsbericht == null ? this.LinerChargenummer : this.imprägnierungsbericht.Schlauchnummer;
|
||||
grunddaten["Charge_Harz"] = this.imprägnierungsbericht == null ? this.HarzChargenummer : (this.imprägnierungsbericht as WerkseitigImprägniert).Imprägniernummer;
|
||||
grunddaten["harz_bedarf_m"] = this.imprägnierungsbericht == null ? harzbedarf : this.imprägnierungsbericht.Harzmenge;
|
||||
grunddaten["gesamt_harz"] = Inspektionsobjekt.Haltungslaenge * harzbedarf;
|
||||
grunddaten["temperatur_harz"] = this.imprägnierungsbericht == null ? this.HarzKalibrierTemperatur : this.imprägnierungsbericht.HarzTemperatur;
|
||||
grunddaten["datum_kalibrierung"] = this.imprägnierungsbericht == null ? this.DatumKalibrierung.ToShortDateString() : this.imprägnierungsbericht.ImprägnierDatum;
|
||||
grunddaten["walzen_abstand"] = this.imprägnierungsbericht == null ? this.KalibierWalzenAbstand : this.imprägnierungsbericht.Walzenabstand;
|
||||
grunddaten["schlauch_dn"] = this.Imprägnierungsbericht != null ? this.imprägnierungsbericht.DN : 0;
|
||||
grunddaten["vakuum"] = this.imprägnierungsbericht == null ? this.KalibrierUnterdruck : this.imprägnierungsbericht.Vakuum;
|
||||
grunddaten["time_start"] = this.AnfangAushaertung;
|
||||
grunddaten["time_ende"] = this.EndeAushaertung;
|
||||
grunddaten["preliner_verwendet"] = this.Preliner ? "ja" : "nein";
|
||||
grunddaten["geschlossene_ende"] = Inspektionsobjekt.GeschlossenesEnde ? "Geschlossenes" : "Offenes";
|
||||
grunddaten["Projekt_NR"] = this.Inspektionsobjekt.Projektnummer;
|
||||
grunddaten["UVImageTemp"] = Path.Combine(destinationPath, "linerGraph_temp.jpg");
|
||||
grunddaten["UVImageDruck"] = Path.Combine(destinationPath, "linerGraph_druck.jpg");
|
||||
grunddaten["UVImageSpeed"] = Path.Combine(destinationPath, "linerGraph_speed.jpg");
|
||||
grunddaten["rueckhol_speed"] = rueckholgeschwindigkeit;
|
||||
grunddaten["liner_type"] = LinerTyp;
|
||||
try
|
||||
{
|
||||
grunddaten["TV_Kontrolle"] = string.Format("Ja, am {0}", AnfangAushaertung.Subtract(TimeSpan.FromMinutes(20)));
|
||||
}
|
||||
catch(ArgumentOutOfRangeException)
|
||||
{
|
||||
grunddaten["TV_Kontrolle"] = "UNDEFINIED";
|
||||
}
|
||||
|
||||
grunddaten["harz_type"] = this.imprägnierungsbericht == null ? HarzTyp : this.imprägnierungsbericht.HarzTyp;
|
||||
grunddaten["Lagerung_Temp"] = lagerungTemperatur;
|
||||
grunddaten["Einbau_Temperatur"] = temperaturEinbau;
|
||||
grunddaten["Inversion_Druck"] = inversionsDruck;
|
||||
try
|
||||
{
|
||||
grunddaten["Lagerung_Text"] = GetLagerungText(DateTime.Parse(imprägnierungsbericht.ImprägnierDatum), this.Datum, lagerungTemperatur);
|
||||
}
|
||||
catch(NullReferenceException)
|
||||
{
|
||||
grunddaten["Lagerung_Text"] = "UNDEFINIED (Kein Liner ausgewählt)";
|
||||
}
|
||||
return grunddaten;
|
||||
}
|
||||
|
||||
public InlinerSanierung()
|
||||
{
|
||||
//datumKalibrierung = new DateTime();
|
||||
lagerungZeiten.Add(10, TimeSpan.FromDays(90));
|
||||
lagerungZeiten.Add(20, TimeSpan.FromDays(30));
|
||||
lagerungZeiten.Add(25, TimeSpan.FromDays(7));
|
||||
lagerungZeiten.Add(31, TimeSpan.FromDays(3));
|
||||
Verzeichnispfad = "UVAnlage";
|
||||
if (datumKalibrierung <= DateTime.MinValue || datumKalibrierung >= DateTime.MaxValue) datumKalibrierung = DateTime.Now;
|
||||
}
|
||||
|
||||
private TimeSpan GetMaxLagerung(int lagerungTemp)
|
||||
{
|
||||
Dictionary<int, TimeSpan>.KeyCollection x = lagerungZeiten.Keys;
|
||||
|
||||
int laufer = 0;
|
||||
if (lagerungTemp > 31) lagerungTemp = 31;
|
||||
|
||||
foreach(int temp in x)
|
||||
{
|
||||
if(lagerungTemp <= temp)
|
||||
{
|
||||
laufer = temp;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return lagerungZeiten[laufer];
|
||||
}
|
||||
|
||||
private string GetLagerungText(DateTime Kalibrierdatum, DateTime Einbaudatum, int lagerungTemperatur)
|
||||
{
|
||||
TimeSpan lagerungszeit = GetMaxLagerung(lagerungTemperatur);
|
||||
|
||||
if(Einbaudatum.Subtract(Kalibrierdatum) <= lagerungszeit)
|
||||
{
|
||||
return "Die Lagerungsdauer wurde somit nicht überschritten";
|
||||
}
|
||||
|
||||
return "Die Lagerungsdauer wurde somit überschritten";
|
||||
}
|
||||
|
||||
public double KalibrierUnterdruck { get => kalibrierUnterdruck; set => kalibrierUnterdruck = value; }
|
||||
|
||||
public double KalibierWalzenAbstand { get => kalibierWalzenAbstand; set => kalibierWalzenAbstand = value; }
|
||||
|
||||
public double HarzKalibrierTemperatur { get => harzKalibrierTemperatur; set => harzKalibrierTemperatur = value; }
|
||||
|
||||
public DateTime DatumKalibrierung
|
||||
{
|
||||
get
|
||||
{
|
||||
return datumKalibrierung;
|
||||
}
|
||||
set
|
||||
{
|
||||
datumKalibrierung = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string HarzChargenummer { get => harzChargenummer; set => harzChargenummer = value; }
|
||||
|
||||
public string LinerChargenummer { get => linerChargenummer; set => linerChargenummer = value; }
|
||||
|
||||
public double Harzbedarf { get => harzbedarf; set => harzbedarf = value; }
|
||||
|
||||
public uint Rueckholgeschwindigkeit { get => rueckholgeschwindigkeit; set => rueckholgeschwindigkeit = value; }
|
||||
|
||||
public bool GeschlosseneEnde { get => geschlosseneEnde; set => geschlosseneEnde = value; }
|
||||
|
||||
public double HarzBedarf { get => harzbedarf; set => harzbedarf = value; }
|
||||
|
||||
public string HarzTyp { get => harzTyp; set => harzTyp = value; }
|
||||
|
||||
public string LinerTyp { get => linerTyp; set => linerTyp = value; }
|
||||
|
||||
public DateTime AnfangAushaertung { get => anfangAushaertung; set => anfangAushaertung = value; }
|
||||
|
||||
public DateTime EndeAushaertung { get => endeAushaertung; set => endeAushaertung = value; }
|
||||
|
||||
public string Ort { get => ort; set => ort = value; }
|
||||
|
||||
public string Bediener { get => bediener; set => bediener = value; }
|
||||
|
||||
public DateTime AnfangKalibrierung { get => anfangKalibrierung; set => anfangKalibrierung = value; }
|
||||
|
||||
public DateTime EndeKalibirierung { get => endeKalibirierung; set => endeKalibirierung = value; }
|
||||
|
||||
public bool Preliner { get => preliner; set => preliner = value; }
|
||||
public int LagerungTemperatur { get => lagerungTemperatur; set => lagerungTemperatur = value; }
|
||||
public int EinbauTemperatur { get => temperaturEinbau; set => temperaturEinbau = value; }
|
||||
public double InversionsDruck { get => inversionsDruck; set => inversionsDruck = value; }
|
||||
public AbstractImprägnier Imprägnierungsbericht { get => imprägnierungsbericht; set => imprägnierungsbericht = value; }
|
||||
}
|
||||
}
|
||||
21
SanSystem/KlassenBIB/Sanierung/Renovation/UVAnlagenTyp.cs
Normal file
21
SanSystem/KlassenBIB/Sanierung/Renovation/UVAnlagenTyp.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UVAnlagenTyp
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Hersteller { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Seriennummer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
public sealed class VorOrtImprägnier : AbstractImprägnier
|
||||
{
|
||||
public double WalzenAbstandSoll
|
||||
{
|
||||
get
|
||||
{
|
||||
return 2*Wanddicke + 1.0;
|
||||
}
|
||||
}
|
||||
public double WalzenAbstandIst { get; set; }
|
||||
public bool VakuumKorrekt { get; set; }
|
||||
public bool EinbautempKorrekt { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
|
||||
public class WerkseitigImprägniert : AbstractImprägnier
|
||||
{
|
||||
public string Imprägniernummer { get; set; }
|
||||
public bool LagerungKorrekt { get; set; }
|
||||
public string LängeCode { get; set; }
|
||||
public decimal LinerLänge { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} ({1})",Imprägniernummer,DN);
|
||||
}
|
||||
}
|
||||
}
|
||||
40
SanSystem/KlassenBIB/Sanierung/Reparatur.cs
Normal file
40
SanSystem/KlassenBIB/Sanierung/Reparatur.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Abstrakte Klasse zur Darstellung einer Partielle Reparatur
|
||||
/// </summary>
|
||||
public abstract class Reparatur : AbstractSanieren
|
||||
{
|
||||
decimal positionImKanal;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal PositionImKanal
|
||||
{
|
||||
get
|
||||
{
|
||||
return positionImKanal;
|
||||
}
|
||||
set
|
||||
{
|
||||
positionImKanal = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="projektpfad"></param>
|
||||
/// <returns></returns>
|
||||
public override string CheckVerzeichnisse(string projektpfad)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
15
SanSystem/KlassenBIB/Sanierung/Reparatur/Hutprofil.cs
Normal file
15
SanSystem/KlassenBIB/Sanierung/Reparatur/Hutprofil.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
/// Zulaufeinbindung
|
||||
/// </summary>
|
||||
public class Hutprofil : SanMitHarz
|
||||
{
|
||||
}
|
||||
}
|
||||
15
SanSystem/KlassenBIB/Sanierung/Reparatur/Kurzliner.cs
Normal file
15
SanSystem/KlassenBIB/Sanierung/Reparatur/Kurzliner.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
/// Partielle Reparatur
|
||||
/// </summary>
|
||||
public class Kurzliner : SanMitHarz
|
||||
{
|
||||
}
|
||||
}
|
||||
15
SanSystem/KlassenBIB/Sanierung/Reparatur/Quicklock.cs
Normal file
15
SanSystem/KlassenBIB/Sanierung/Reparatur/Quicklock.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
/// Quicklock manschette
|
||||
/// </summary>
|
||||
public class Quicklock : Reparatur
|
||||
{
|
||||
}
|
||||
}
|
||||
31
SanSystem/KlassenBIB/Sanierung/Reparatur/SanMitHarz.cs
Normal file
31
SanSystem/KlassenBIB/Sanierung/Reparatur/SanMitHarz.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class SanMitHarz : Reparatur
|
||||
{
|
||||
ChargeNummerCollection chargeNummerns;
|
||||
|
||||
/// <summary>
|
||||
/// Liste mit die Chargenummern
|
||||
/// </summary>
|
||||
public ChargeNummerCollection ChargeNummern
|
||||
{
|
||||
get
|
||||
{
|
||||
return chargeNummerns;
|
||||
}
|
||||
set
|
||||
{
|
||||
chargeNummerns = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
93
SanSystem/KlassenBIB/Sanierung/Sanierung.cs
Normal file
93
SanSystem/KlassenBIB/Sanierung/Sanierung.cs
Normal file
@@ -0,0 +1,93 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Browsable(false)]
|
||||
public abstract class Sanierung : INotifyPropertyChanged
|
||||
{
|
||||
Guid guid;
|
||||
double tempAusen;
|
||||
double tempKanal;
|
||||
string wetter;
|
||||
bool genehmigungVorhanden;
|
||||
bool wasserhaltungEingerichtet;
|
||||
bool sTVOAbsicherung;
|
||||
bool hDReinigung;
|
||||
bool vorbereitetMechanisch;
|
||||
bool vorbereitetRoboter;
|
||||
DateTime hDReinigungDatum;
|
||||
//DateTime sanierungsDatum;
|
||||
Inspektionsobjekt inspektionsobjekt;
|
||||
|
||||
protected string pfadZurSan;
|
||||
|
||||
[Browsable(false)]
|
||||
public Sanierung()
|
||||
{
|
||||
//if (inspektionsobjekt == null) return;
|
||||
//pfadZurSan = string.Format();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public abstract string CheckVerzeichnisse(string projektpfad);
|
||||
|
||||
public Guid Guid { get => guid; set => guid = value; }
|
||||
|
||||
public double TempAusen
|
||||
{
|
||||
get => tempAusen;
|
||||
set
|
||||
{
|
||||
if(tempAusen != value)
|
||||
{
|
||||
tempAusen = value;
|
||||
NotifyPropertyChanged();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public double TempKanal { get => tempKanal; set => tempKanal = value; }
|
||||
|
||||
public string Wetter { get => wetter; set => wetter = value; }
|
||||
|
||||
public bool GenehmigungVorhanden { get => genehmigungVorhanden; set => genehmigungVorhanden = value; }
|
||||
|
||||
public bool WasserhaltungEingerichtet { get => wasserhaltungEingerichtet; set => wasserhaltungEingerichtet = value; }
|
||||
|
||||
public bool STVOAbsicherung { get => sTVOAbsicherung; set => sTVOAbsicherung = value; }
|
||||
|
||||
public bool HDReinigung { get => hDReinigung; set => hDReinigung = value; }
|
||||
|
||||
public DateTime HDReinigungDatum { get => hDReinigungDatum; set => hDReinigungDatum = value; }
|
||||
|
||||
public Inspektionsobjekt Inspektionsobjekt { get => inspektionsobjekt; set => inspektionsobjekt = value; }
|
||||
|
||||
protected string PfadZurSan {
|
||||
get
|
||||
{
|
||||
return string.Format("{0}-{1}", Inspektionsobjekt.VonPunkt, Inspektionsobjekt.BisPunkt);
|
||||
}
|
||||
}
|
||||
|
||||
public bool VorbereitetMechanisch { get => vorbereitetMechanisch; set => vorbereitetMechanisch = value; }
|
||||
|
||||
public bool VorbereitetRoboter { get => vorbereitetRoboter; set => vorbereitetRoboter = value; }
|
||||
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
private void NotifyPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
if (PropertyChanged != null)
|
||||
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
}
|
||||
23
SanSystem/KlassenBIB/Sanierung/StructChargeNummern.cs
Normal file
23
SanSystem/KlassenBIB/Sanierung/StructChargeNummern.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public struct StructChargeNummern
|
||||
{
|
||||
/// <summary>
|
||||
/// Bezeichnung des Harzes oder Material
|
||||
/// </summary>
|
||||
public string Bezeichnung;
|
||||
/// <summary>
|
||||
/// ChargeNummer vom Material
|
||||
/// </summary>
|
||||
public string ChargeNummer;
|
||||
}
|
||||
}
|
||||
54
SanSystem/KlassenBIB/Sanierungskonzept.cs
Normal file
54
SanSystem/KlassenBIB/Sanierungskonzept.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Sanierungskonzept
|
||||
{
|
||||
string anweisung;
|
||||
|
||||
/// <summary>
|
||||
/// Anweisung zur Darstellung vom Art des Reparatur
|
||||
/// </summary>
|
||||
public string Anweisung
|
||||
{
|
||||
get
|
||||
{
|
||||
return anweisung;
|
||||
}
|
||||
set
|
||||
{
|
||||
anweisung = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Die Reparatur
|
||||
/// </summary>
|
||||
public Reparatur Reparatur { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override string ToString()
|
||||
{
|
||||
string result = "";
|
||||
|
||||
bool sanVorhanden = Reparatur != null;
|
||||
|
||||
bool sanAbgeschlossen = (sanVorhanden && Reparatur.Fertig);
|
||||
|
||||
result = string.Format("{0} abgeschlossen : {1}", Anweisung, sanAbgeschlossen);
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
34
SanSystem/KlassenBIB/SavedBilder.cs
Normal file
34
SanSystem/KlassenBIB/SavedBilder.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class SavedBilder
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Bildname { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Speicherpfad { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Bemerkung { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public override string ToString()
|
||||
{
|
||||
return Bildname;
|
||||
}
|
||||
}
|
||||
}
|
||||
51
SanSystem/KlassenBIB/SchachtAnbindung.cs
Normal file
51
SanSystem/KlassenBIB/SchachtAnbindung.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class SchachtAnbindung : AbstractSanieren
|
||||
{
|
||||
string schachtNummer;
|
||||
Collections.Bilder savedBilders;
|
||||
|
||||
#region GettersSetters
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string SchachtNummer { get => schachtNummer; set => schachtNummer = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Collections.Bilder SavedBilders { get => savedBilders; set => savedBilders = value; }
|
||||
#endregion
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public SchachtAnbindung()
|
||||
{
|
||||
Verzeichnispfad = "Schachtanbindung";
|
||||
SavedBilders = new Collections.Bilder();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public override string CheckVerzeichnisse(string projektpfad)
|
||||
{
|
||||
string path = Path.Combine(projektpfad, PfadZurSan);
|
||||
if (!Directory.Exists(path)) Directory.CreateDirectory(path);
|
||||
|
||||
string mypath = Path.Combine(path, Verzeichnispfad);
|
||||
if (!Directory.Exists(mypath)) Directory.CreateDirectory(mypath);
|
||||
|
||||
return mypath;
|
||||
}
|
||||
}
|
||||
}
|
||||
13
SanSystem/SanShared/BerichtWorker.cs
Normal file
13
SanSystem/SanShared/BerichtWorker.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SanShared
|
||||
{
|
||||
public class BerichtWorker
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
27
SanSystem/SanShared/BilderObject.cs
Normal file
27
SanSystem/SanShared/BilderObject.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SanShared
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class BilderObject
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Kommentar { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Path { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int ImgID { get; set; }
|
||||
}
|
||||
}
|
||||
170
SanSystem/SanShared/Dongle.cs
Normal file
170
SanSystem/SanShared/Dongle.cs
Normal file
@@ -0,0 +1,170 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CodeMeter;
|
||||
|
||||
namespace SanShared
|
||||
{
|
||||
//4e 6a 41 77 4e 6a 51 7a 51 44 4d 78 4d 7a 6b 79 5a 54 4d 30 4d 6d 55 7a 4d 47 35 4c 61 32 55 7a 51 31 46 30 52 33 64 46 5a 45 68 35 56 57 74 47 61 7a 5a 30 61 48 70 55 57 69 39 58 64 6b 78 4a 54 32 78 43 62 6b 74 58 52 58 46 57 63 30 5a 73 64 7a 41 39
|
||||
public class Dongle : IDisposable
|
||||
{
|
||||
uint FirmCode;
|
||||
uint ProductCode;
|
||||
public string SyncfusionKey = "";
|
||||
|
||||
Api cmApi;
|
||||
CmCredential cmCred;
|
||||
CmAccess2 cmAcc;
|
||||
HCMSysEntry hcmse;
|
||||
CmBoxInfo cmBoxInfo;
|
||||
CmBoxEntry2 BoxContent;
|
||||
|
||||
public Dongle(uint ProductCode)
|
||||
{
|
||||
#if !DEBUG
|
||||
this.FirmCode = 103086;
|
||||
this.ProductCode = ProductCode;
|
||||
#else
|
||||
return;
|
||||
this.FirmCode = 10;
|
||||
this.ProductCode = 1;
|
||||
#endif
|
||||
|
||||
|
||||
cmApi = new Api();
|
||||
cmCred = new CmCredential();
|
||||
cmAcc = new CmAccess2();
|
||||
|
||||
cmAcc.Credential = cmCred;
|
||||
|
||||
cmAcc.Ctrl |= CmAccess.Option.UserLimit;
|
||||
cmAcc.FirmCode = this.FirmCode;
|
||||
cmAcc.ProductCode = this.ProductCode;
|
||||
|
||||
|
||||
hcmse = cmApi.CmAccess2(CmAccessOption.Local, cmAcc);
|
||||
if (hcmse == null)
|
||||
{
|
||||
ErrorCodes2 code = cmApi.CmGetLastErrorCode2();
|
||||
string output = string.Format("{0}", code);
|
||||
|
||||
}
|
||||
|
||||
if (!CheckDongleVorhanden())
|
||||
throw new Exception("Dongle not connected");
|
||||
|
||||
cmBoxInfo = new CmBoxInfo();
|
||||
|
||||
CmGetBoxContentsOption boxOptions = new CmGetBoxContentsOption();
|
||||
boxOptions = CmGetBoxContentsOption.AllEntries;
|
||||
|
||||
CmBoxEntry2[] tmpBoxContent;
|
||||
|
||||
tmpBoxContent = cmApi.CmGetBoxContents2(hcmse, boxOptions, this.FirmCode, cmBoxInfo);
|
||||
|
||||
CmEntryData[] pCmBoxEntry = (CmEntryData[])cmApi.CmGetInfo(hcmse, CmGetInfoOption.EntryData);
|
||||
|
||||
for (int i = 0; i < pCmBoxEntry.Length; i++)
|
||||
{
|
||||
switch (pCmBoxEntry[i].Ctrl & 0x0ffff)
|
||||
{
|
||||
case (uint)CodeMeter.GlobalEntryOption.ProtectedData:
|
||||
// Transfer to transformed byte
|
||||
uint length = pCmBoxEntry[i].DataLen;
|
||||
byte[] datas = new byte[length];
|
||||
for(uint f = 0; f < length; f++)
|
||||
{
|
||||
datas[f] = pCmBoxEntry[i].Data[f];
|
||||
}
|
||||
|
||||
|
||||
SyncfusionKey = Encoding.ASCII.GetString(datas);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (CmBoxEntry2 boxes in tmpBoxContent)
|
||||
{
|
||||
if (boxes.ProductCode == this.ProductCode)
|
||||
{
|
||||
this.BoxContent = boxes;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
~Dongle()
|
||||
{
|
||||
CleanDongle();
|
||||
}
|
||||
|
||||
public void CleanDongle()
|
||||
{
|
||||
#if DEBUG
|
||||
return;
|
||||
#endif
|
||||
cmApi.CmRelease(hcmse);
|
||||
}
|
||||
|
||||
public bool CheckDongleVorhanden()
|
||||
{
|
||||
#if LAPTOP
|
||||
return true;
|
||||
#else
|
||||
if (hcmse == null)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
public string GetDongleSerial()
|
||||
{
|
||||
|
||||
CmBoxInfo res = (CmBoxInfo)cmApi.CmGetInfo(hcmse, CmGetInfoOption.BoxInfo);
|
||||
if (null != res)
|
||||
{
|
||||
return res.SerialNumber.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("Fehler beim aufrufen der Seriennummer");
|
||||
}
|
||||
}
|
||||
|
||||
public uint GetFeatureMap()
|
||||
{
|
||||
return BoxContent.FeatureMap;
|
||||
}
|
||||
|
||||
public string GetName()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public bool IsLicensed(byte neededMask)
|
||||
{
|
||||
#if DEBUG
|
||||
return true;
|
||||
#else
|
||||
uint DongleFeature = GetFeatureMap();
|
||||
|
||||
//Trace.WriteLine("DongleFeature: " + DongleFeature);
|
||||
|
||||
byte DongleFeatureB = (byte)DongleFeature;
|
||||
|
||||
if ((DongleFeatureB & neededMask) == neededMask)
|
||||
return true;
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
CleanDongle();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
28
SanSystem/SanShared/Exceptions/CSVImportException.cs
Normal file
28
SanSystem/SanShared/Exceptions/CSVImportException.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SanShared.Exceptions
|
||||
{
|
||||
public class CSVImportException : Exception
|
||||
{
|
||||
public CSVImportException()
|
||||
{
|
||||
}
|
||||
|
||||
public CSVImportException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public CSVImportException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
protected CSVImportException(SerializationInfo info, StreamingContext context) : base(info, context)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SanShared.Exceptions
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class DataBaseVersionMismatchException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DataBaseVersionMismatchException()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
public DataBaseVersionMismatchException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="innerException"></param>
|
||||
public DataBaseVersionMismatchException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="context"></param>
|
||||
protected DataBaseVersionMismatchException(SerializationInfo info, StreamingContext context) : base(info, context)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
45
SanSystem/SanShared/Exceptions/LangNotFoundException.cs
Normal file
45
SanSystem/SanShared/Exceptions/LangNotFoundException.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SanShared.Exceptions
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LangNotFoundException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public LangNotFoundException()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
public LangNotFoundException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="innerException"></param>
|
||||
public LangNotFoundException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="context"></param>
|
||||
protected LangNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
25
SanSystem/SanShared/IAuftraggeber.cs
Normal file
25
SanSystem/SanShared/IAuftraggeber.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
namespace SanShared
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public interface IAuftraggeber
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
string Name { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
string Strasse { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
string Ort { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
string Ansprechpartner { get; set; }
|
||||
}
|
||||
}
|
||||
28
SanSystem/SanShared/IImportedObjekte.cs
Normal file
28
SanSystem/SanShared/IImportedObjekte.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SanShared
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface zur Import von Daten
|
||||
/// </summary>
|
||||
public interface IImportedObjekte
|
||||
{
|
||||
/// <summary>
|
||||
/// Angaben zur XMLDatei die importiert werden soll
|
||||
/// </summary>
|
||||
string XMLFile { get; set; }
|
||||
/// <summary>
|
||||
/// Angaben zur Projektnummern die eingetragen werden soll in die Objekte
|
||||
/// </summary>
|
||||
string Projektnummer { get; set; }
|
||||
/// <summary>
|
||||
/// Funktion der die Inspektionsobjekte übergibt
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
List<IInspektionsobjekt> GetInspektionsobjekte();
|
||||
}
|
||||
}
|
||||
12
SanSystem/SanShared/IInspektionsobjekt.cs
Normal file
12
SanSystem/SanShared/IInspektionsobjekt.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SanShared
|
||||
{
|
||||
public interface IInspektionsobjekt
|
||||
{
|
||||
}
|
||||
}
|
||||
23
SanSystem/SanShared/IMakeProtokol.cs
Normal file
23
SanSystem/SanShared/IMakeProtokol.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SanShared
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public interface IMakeProtokol
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="destinationPath"></param>
|
||||
/// <param name="projekt">Projekt</param>
|
||||
/// <returns></returns>
|
||||
Hashtable MakeProtokoll(string destinationPath, IProjekt projekt, DateTime offset);
|
||||
}
|
||||
}
|
||||
9
SanSystem/SanShared/IProjekt.cs
Normal file
9
SanSystem/SanShared/IProjekt.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace SanShared
|
||||
{
|
||||
public interface IProjekt
|
||||
{
|
||||
IAuftraggeber Auftraggeber { get; set; }
|
||||
string SanierungsIDPrefix { get; set; }
|
||||
string SanierungsIDSuffix { get; set; }
|
||||
}
|
||||
}
|
||||
24
SanSystem/SanShared/IReadCSVData.cs
Normal file
24
SanSystem/SanShared/IReadCSVData.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SanShared
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public interface IReadCSVData
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
List<UVcsvStrukture> ReadCSVStrukture();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
string[] Input { get; }
|
||||
}
|
||||
}
|
||||
21
SanSystem/SanShared/ITemperature.cs
Normal file
21
SanSystem/SanShared/ITemperature.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SanShared
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public interface ITemperature
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <returns></returns>
|
||||
double GetTemperatur(out string message);
|
||||
}
|
||||
}
|
||||
35
SanSystem/SanShared/UVcsvStrukture.cs
Normal file
35
SanSystem/SanShared/UVcsvStrukture.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SanShared
|
||||
{
|
||||
/// <summary>
|
||||
/// CSV Dateistruktur
|
||||
/// </summary>
|
||||
public class UVcsvStrukture
|
||||
{
|
||||
DateTime zeitstempel;
|
||||
double temperatur;
|
||||
int druck;
|
||||
double geschwindigkeit;
|
||||
/// <summary>
|
||||
/// Zeitstempel vom Eintrag
|
||||
/// </summary>
|
||||
public DateTime Zeitstempel { get => zeitstempel; set => zeitstempel = value; }
|
||||
/// <summary>
|
||||
/// Temperatur anzeige vom Eintrag
|
||||
/// </summary>
|
||||
public double Temperatur { get => temperatur; set => temperatur = value; }
|
||||
/// <summary>
|
||||
/// Druckanzeige vom Eintrag
|
||||
/// </summary>
|
||||
public int Druck { get => druck; set => druck = value; }
|
||||
/// <summary>
|
||||
/// Geschwindigkeit vom Eintrag
|
||||
/// </summary>
|
||||
public double Geschwindigkeit { get => geschwindigkeit; set => geschwindigkeit = value; }
|
||||
}
|
||||
}
|
||||
@@ -52,9 +52,18 @@
|
||||
<Reference Include="Syncfusion.Chart.Windows, Version=19.4460.0.56, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Syncfusion.Chart.Windows.19.4.0.56\lib\net46\Syncfusion.Chart.Windows.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Syncfusion.Compression.Base, Version=19.4460.0.56, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Syncfusion.Compression.Base.19.4.0.56\lib\net46\Syncfusion.Compression.Base.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Syncfusion.Core.WinForms, Version=19.4460.0.56, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Syncfusion.Core.WinForms.19.4.0.56\lib\net46\Syncfusion.Core.WinForms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Syncfusion.DocIO.Base, Version=19.4460.0.56, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Syncfusion.DocIO.WinForms.19.4.0.56\lib\net46\Syncfusion.DocIO.Base.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Syncfusion.DocToPdfConverter.Base, Version=19.4460.0.56, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Syncfusion.DocToPDFConverter.WinForms.19.4.0.56\lib\net46\Syncfusion.DocToPdfConverter.Base.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Syncfusion.Grid.Base, Version=19.4460.0.56, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Syncfusion.Grid.Base.19.4.0.56\lib\net46\Syncfusion.Grid.Base.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -67,6 +76,15 @@
|
||||
<Reference Include="Syncfusion.Licensing, Version=19.4460.0.56, Culture=neutral, PublicKeyToken=632609b4d040f6b4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Syncfusion.Licensing.19.4.0.56\lib\net46\Syncfusion.Licensing.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Syncfusion.OfficeChart.Base, Version=19.4460.0.56, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Syncfusion.OfficeChart.Base.19.4.0.56\lib\net46\Syncfusion.OfficeChart.Base.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Syncfusion.Pdf.Base, Version=19.4460.0.56, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Syncfusion.Pdf.WinForms.19.4.0.56\lib\net46\Syncfusion.Pdf.Base.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Syncfusion.PdfViewer.Windows, Version=19.4460.0.56, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Syncfusion.PdfViewer.Windows.19.4.0.56\lib\net46\Syncfusion.PdfViewer.Windows.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Syncfusion.SfInput.WinForms, Version=19.4460.0.56, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Syncfusion.SfInput.WinForms.19.4.0.56\lib\net46\Syncfusion.SfInput.WinForms.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -95,6 +113,7 @@
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
@@ -104,9 +123,43 @@
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Tinkerforge">
|
||||
<HintPath>..\dlls\Tinkerforge.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WibuCmNET">
|
||||
<HintPath>..\3rdPackage\WibuCmNET.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="wupi.net">
|
||||
<HintPath>..\3rdPackage\wupi.net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WupiEngineNet">
|
||||
<HintPath>..\3rdPackage\WupiEngineNet.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BerichtGen\Bericht.cs" />
|
||||
<Compile Include="BerichtGen\BerichtWorker.cs" />
|
||||
<Compile Include="BerichtGen\FrmOptions.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BerichtGen\FrmOptions.Designer.cs">
|
||||
<DependentUpon>FrmOptions.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BerichtGen\FrmPDFViewer.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BerichtGen\FrmPDFViewer.Designer.cs">
|
||||
<DependentUpon>FrmPDFViewer.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BerichtGen\makeGraphic.cs" />
|
||||
<Compile Include="BüroExporter.cs" />
|
||||
<Compile Include="CSVParser\AcceptedCSVFormats.cs" />
|
||||
<Compile Include="CSVParser\BlueLight.cs" />
|
||||
<Compile Include="CSVParser\CSVParser.cs" />
|
||||
<Compile Include="CSVParser\CsvParserFactory.cs" />
|
||||
<Compile Include="CSVParser\UVRelining.cs" />
|
||||
<Compile Include="Database\Datenbank.cs" />
|
||||
<Compile Include="Database\UpdateDatabase.cs" />
|
||||
<Compile Include="Einstellungen\ObjecteListSetting.cs" />
|
||||
<Compile Include="Einstellungen\Settings.cs" />
|
||||
<Compile Include="Einstellungen\SoftwareConfiguration.cs" />
|
||||
@@ -244,10 +297,75 @@
|
||||
<DependentUpon>frmInfo.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Global.cs" />
|
||||
<Compile Include="KlassenBIB\Auftraggeber.cs" />
|
||||
<Compile Include="KlassenBIB\AusgefuehrteTaetigkeiten.cs" />
|
||||
<Compile Include="KlassenBIB\Collections\AbwasserTechnischeAnlage.cs" />
|
||||
<Compile Include="KlassenBIB\Collections\AuftraggeberList.cs" />
|
||||
<Compile Include="KlassenBIB\Collections\AusgefuehrteTaetigkeiten.cs" />
|
||||
<Compile Include="KlassenBIB\Collections\Bilder.cs" />
|
||||
<Compile Include="KlassenBIB\Collections\ChargeNummer.cs" />
|
||||
<Compile Include="KlassenBIB\Collections\ImprägnierBericht.cs" />
|
||||
<Compile Include="KlassenBIB\Collections\Inspektionskuerzeln.cs" />
|
||||
<Compile Include="KlassenBIB\Collections\Leistungsverzeichnis.cs" />
|
||||
<Compile Include="KlassenBIB\Collections\Projekte.cs" />
|
||||
<Compile Include="KlassenBIB\Collections\Sanierung.cs" />
|
||||
<Compile Include="KlassenBIB\Collections\Sanierungskonzept.cs" />
|
||||
<Compile Include="KlassenBIB\DB.cs" />
|
||||
<Compile Include="KlassenBIB\IImportedObjekte.cs" />
|
||||
<Compile Include="KlassenBIB\Inspektionskuerzeln.cs" />
|
||||
<Compile Include="KlassenBIB\Inspektionsobjekt.cs" />
|
||||
<Compile Include="KlassenBIB\LeistungsVerzeichnis.cs" />
|
||||
<Compile Include="KlassenBIB\Lieferschein.cs" />
|
||||
<Compile Include="KlassenBIB\LinerChargen.cs" />
|
||||
<Compile Include="KlassenBIB\Projekt.cs" />
|
||||
<Compile Include="KlassenBIB\Sanierungskonzept.cs" />
|
||||
<Compile Include="KlassenBIB\Sanierung\AbstractSanieren.cs" />
|
||||
<Compile Include="KlassenBIB\Sanierung\Renovation\AbstractImprägnier.cs" />
|
||||
<Compile Include="KlassenBIB\Sanierung\Renovation\ImprägnierungStrukture.cs" />
|
||||
<Compile Include="KlassenBIB\Sanierung\Renovation\InlinerSanierung.cs" />
|
||||
<Compile Include="KlassenBIB\Sanierung\Renovation\UVAnlagenTyp.cs" />
|
||||
<Compile Include="KlassenBIB\Sanierung\Renovation\VorOrtImprägnier.cs" />
|
||||
<Compile Include="KlassenBIB\Sanierung\Renovation\WerkseitigImprägniert.cs" />
|
||||
<Compile Include="KlassenBIB\Sanierung\Reparatur.cs" />
|
||||
<Compile Include="KlassenBIB\Sanierung\Reparatur\Hutprofil.cs" />
|
||||
<Compile Include="KlassenBIB\Sanierung\Reparatur\Kurzliner.cs" />
|
||||
<Compile Include="KlassenBIB\Sanierung\Reparatur\Quicklock.cs" />
|
||||
<Compile Include="KlassenBIB\Sanierung\Reparatur\SanMitHarz.cs" />
|
||||
<Compile Include="KlassenBIB\Sanierung\Sanierung.cs" />
|
||||
<Compile Include="KlassenBIB\Sanierung\StructChargeNummern.cs" />
|
||||
<Compile Include="KlassenBIB\SavedBilder.cs" />
|
||||
<Compile Include="KlassenBIB\SchachtAnbindung.cs" />
|
||||
<Compile Include="MassenStatistik.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="ProgrammModule.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SanShared\BerichtWorker.cs" />
|
||||
<Compile Include="SanShared\BilderObject.cs" />
|
||||
<Compile Include="SanShared\Dongle.cs" />
|
||||
<Compile Include="SanShared\Exceptions\CSVImportException.cs" />
|
||||
<Compile Include="SanShared\Exceptions\DataBaseVersionMismatchException.cs" />
|
||||
<Compile Include="SanShared\Exceptions\LangNotFoundException.cs" />
|
||||
<Compile Include="SanShared\IAuftraggeber.cs" />
|
||||
<Compile Include="SanShared\IImportedObjekte.cs" />
|
||||
<Compile Include="SanShared\IInspektionsobjekt.cs" />
|
||||
<Compile Include="SanShared\IMakeProtokol.cs" />
|
||||
<Compile Include="SanShared\IProjekt.cs" />
|
||||
<Compile Include="SanShared\IReadCSVData.cs" />
|
||||
<Compile Include="SanShared\ITemperature.cs" />
|
||||
<Compile Include="SanShared\UVcsvStrukture.cs" />
|
||||
<Compile Include="SchnittstelleImporter\I2006XML.cs" />
|
||||
<Compile Include="SchnittstelleImporter\ImportBuilder.cs" />
|
||||
<Compile Include="SchnittstelleImporter\XML2006\Anschlussdaten.cs" />
|
||||
<Compile Include="SchnittstelleImporter\XML2006\Enums.cs" />
|
||||
<Compile Include="SchnittstelleImporter\XML2006\InspizierteAbwassertechnischeAnlage.cs" />
|
||||
<Compile Include="SchnittstelleImporter\XML2006\Lage.cs" />
|
||||
<Compile Include="SchnittstelleImporter\XML2006\OptischeInspektion.cs" />
|
||||
<Compile Include="SchnittstelleImporter\XML2006\RGrunddaten.cs" />
|
||||
<Compile Include="SchnittstelleImporter\XML2006\Rohrleitung.cs" />
|
||||
<Compile Include="SchnittstelleImporter\XML2006\RZustand.cs" />
|
||||
<Compile Include="SchnittstelleImporter\XML2006\XMLParser.cs" />
|
||||
<Compile Include="TempCAN\TemperaturBuilder.cs" />
|
||||
<Compile Include="TempCAN\TinkerForgeTemperatur.cs" />
|
||||
<Compile Include="UCInliner.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
@@ -272,6 +390,12 @@
|
||||
<Compile Include="UCWerkseitigImprägniert.Designer.cs">
|
||||
<DependentUpon>UCWerkseitigImprägniert.cs</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="BerichtGen\FrmOptions.resx">
|
||||
<DependentUpon>FrmOptions.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="BerichtGen\FrmPDFViewer.resx">
|
||||
<DependentUpon>FrmPDFViewer.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FrmAktuelleBesatzung.resx">
|
||||
<DependentUpon>FrmAktuelleBesatzung.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -380,43 +504,34 @@
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<None Include="SchnittstelleImporter\XML2006\SchemaDateien\0610-betriebsdaten.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="SchnittstelleImporter\XML2006\SchemaDateien\0610-hydraulikdaten.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="SchnittstelleImporter\XML2006\SchemaDateien\0610-metadaten.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="SchnittstelleImporter\XML2006\SchemaDateien\0610-referenzlisten.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="SchnittstelleImporter\XML2006\SchemaDateien\0610-stammdaten.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="SchnittstelleImporter\XML2006\SchemaDateien\0610-zustandsdaten.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BerichtGen\BerichtGen.csproj">
|
||||
<Project>{3022da07-fd06-4aea-9fc8-00d318e95a82}</Project>
|
||||
<Name>BerichtGen</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\CSVParser\CSVParser.csproj">
|
||||
<Project>{3f79bd28-9bf6-4902-8977-41e9e71f8488}</Project>
|
||||
<Name>CSVParser</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Database\Database.csproj">
|
||||
<Project>{b0227727-6cf9-4e2e-9afe-5dd76deaa9db}</Project>
|
||||
<Name>Database</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Dichtheitspruefung\Dichtheitsprüfung\Dichtheitsprüfung.csproj">
|
||||
<Project>{324277c6-2eb3-47b7-9dd5-7fa520e7d349}</Project>
|
||||
<Name>Dichtheitsprüfung</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\KlassenBIB\KlassenBIB.csproj">
|
||||
<Project>{c82bd650-466b-403f-bed9-2b1660771f54}</Project>
|
||||
<Name>KlassenBIB</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SanShared\SanShared.csproj">
|
||||
<Project>{c949087e-20e1-4a17-b021-faead363c1d8}</Project>
|
||||
<Name>SanShared</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SchnittstelleImporter\SchnittstelleImporter.csproj">
|
||||
<Project>{E1564A4D-39FD-489B-8029-AEEF33033EF2}</Project>
|
||||
<Name>SchnittstelleImporter</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\TempCAN\TempCAN.csproj">
|
||||
<Project>{e4979419-5eae-4b6d-a6a0-9632c1de87a0}</Project>
|
||||
<Name>TempCAN</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\UpdateLib\UpdateLib.csproj">
|
||||
<Project>{cf95db30-247b-4382-948e-3bd5eb73c938}</Project>
|
||||
<Name>UpdateLib</Name>
|
||||
|
||||
199
SanSystem/SchnittstelleImporter/I2006XML.cs
Normal file
199
SanSystem/SchnittstelleImporter/I2006XML.cs
Normal file
@@ -0,0 +1,199 @@
|
||||
using SanShared;
|
||||
using SchnittstelleImporter.XML2006;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
using System.Xml.Schema;
|
||||
|
||||
namespace SchnittstelleImporter
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class I2006XML : IImportedObjekte
|
||||
{
|
||||
string xmlFile;
|
||||
string projektnummer;
|
||||
Dictionary<string, string> materialReferenz = new Dictionary<string, string>();
|
||||
/// <summary>
|
||||
/// Angabe zur XML datei
|
||||
/// </summary>
|
||||
public string XMLFile
|
||||
{
|
||||
get
|
||||
{
|
||||
return xmlFile;
|
||||
}
|
||||
set
|
||||
{
|
||||
xmlFile = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Angabe zur Projektnummer
|
||||
/// </summary>
|
||||
public string Projektnummer
|
||||
{
|
||||
get
|
||||
{
|
||||
return projektnummer;
|
||||
}
|
||||
set
|
||||
{
|
||||
projektnummer = value;
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public I2006XML()
|
||||
{
|
||||
LoadMaterialien();
|
||||
}
|
||||
private void LoadMaterialien()
|
||||
{
|
||||
materialReferenz.Add("AZ", "AsbestZement");
|
||||
materialReferenz.Add("B", "Beton");
|
||||
materialReferenz.Add("BS", "BetonSegmente");
|
||||
|
||||
/*materialReferenz.Add("CNS
|
||||
materialReferenz.Add("EIS
|
||||
materialReferenz.Add("FZ
|
||||
*/
|
||||
materialReferenz.Add("GFK", "GFK");
|
||||
materialReferenz.Add("GG", "Grauguss");
|
||||
/*
|
||||
materialReferenz.Add("GGG
|
||||
materialReferenz.Add("KST
|
||||
materialReferenz.Add("MA
|
||||
materialReferenz.Add("OB
|
||||
materialReferenz.Add("P
|
||||
materialReferenz.Add("PC
|
||||
materialReferenz.Add("PCC
|
||||
*/
|
||||
materialReferenz.Add("PE", "PE");
|
||||
materialReferenz.Add("PEHD", "PEHD");
|
||||
/*
|
||||
materialReferenz.Add("PH
|
||||
materialReferenz.Add("PHB
|
||||
*/
|
||||
materialReferenz.Add("PP", "Polypropolen");
|
||||
materialReferenz.Add("PVC", "Polyvinylchlorid");
|
||||
materialReferenz.Add("PVCU", "Polyvinylchlorid hart");
|
||||
/*materialReferenz.Add("SFB
|
||||
materialReferenz.Add("SPB
|
||||
*/
|
||||
materialReferenz.Add("SB", "Stahlbeton");
|
||||
//materialReferenz.Add("ST
|
||||
materialReferenz.Add("STZ", "Steinzeug");
|
||||
/*materialReferenz.Add("SZB
|
||||
materialReferenz.Add("W
|
||||
materialReferenz.Add("ZG
|
||||
materialReferenz.Add("MIX
|
||||
materialReferenz.Add("BOD
|
||||
materialReferenz.Add("RAS
|
||||
materialReferenz.Add("PFL
|
||||
*/
|
||||
}
|
||||
|
||||
private string getRohrmaterial(string kennung)
|
||||
{
|
||||
string result;
|
||||
if (!materialReferenz.TryGetValue(kennung, out result))
|
||||
result = kennung;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private static void LoadRefListe()
|
||||
{
|
||||
//XmlSchema s = XmlSchema.Read(XmlReader.Create(@"XML2006\SchemaDateien\0610-referenzlisten.xsd"), null);
|
||||
XmlDocument xmlDocument = new XmlDocument();
|
||||
xmlDocument.Load(@"XML2006\SchemaDateien\0610-referenzlisten.xsd");
|
||||
|
||||
XmlNodeReader nodeReader = new XmlNodeReader(xmlDocument);
|
||||
while(nodeReader.Read())
|
||||
{
|
||||
Trace.WriteLine(nodeReader.Name);
|
||||
Trace.WriteLine(nodeReader.GetAttribute("name"));
|
||||
}
|
||||
/*
|
||||
int x = xmlDocument.ChildNodes.Count;
|
||||
var y = xmlDocument.ChildNodes[7];
|
||||
|
||||
for(int i = 0; i < y.ChildNodes.Count; i++)
|
||||
{
|
||||
var d = y.ChildNodes[i];
|
||||
var e = d["MaterialType"];
|
||||
Trace.WriteLine(e);
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
private static void ValidationCallback(object sender, ValidationEventArgs e)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<IInspektionsobjekt> GetInspektionsobjekte()
|
||||
{
|
||||
/*
|
||||
List<IInspektionsobjekt> result = new List<IInspektionsobjekt>();
|
||||
List<InspizierteAbwassertechnischeAnlage> anlagen = XMLParser.GetList(XMLFile);
|
||||
foreach(InspizierteAbwassertechnischeAnlage src in anlagen)
|
||||
{
|
||||
IInspektionsobjekt inspektionsobjekt = new Inspektionsobjekt();
|
||||
KlassenBIB.Collections.Inspektionskuerzeln inspektionskuerzelns = new KlassenBIB.Collections.Inspektionskuerzeln();
|
||||
|
||||
inspektionsobjekt.Projektnummer = projektnummer;
|
||||
inspektionsobjekt.Objektbezeichnung = src.Objektbezeichnung;
|
||||
inspektionsobjekt.OrtName = src.Lage.Ortname!= null? src.Lage.Ortname : "";
|
||||
inspektionsobjekt.StrasseName = src.Lage.Strassename != null ? src.Lage.Strassename : "noname";
|
||||
inspektionsobjekt.RohrMaterial = src.OptischeInspektion.Rohrleitung.Grunddaten.Material != null ? getRohrmaterial(src.OptischeInspektion.Rohrleitung.Grunddaten.Material) : "Unbekannt";
|
||||
inspektionsobjekt.Kanalrohrweite = src.OptischeInspektion.Rohrleitung.Grunddaten.Profilhoehe != 0 ? (uint)src.OptischeInspektion.Rohrleitung.Grunddaten.Profilhoehe : (uint)src.OptischeInspektion.Rohrleitung.Grunddaten.Profilbreite;
|
||||
inspektionsobjekt.Haltungslaenge = Convert.ToDouble(src.OptischeInspektion.Rohrleitung.Inspektionslaenge);
|
||||
inspektionsobjekt.VonPunkt = src.OptischeInspektion.Rohrleitung.Grunddaten.KnotenZulauf;
|
||||
inspektionsobjekt.BisPunkt = src.OptischeInspektion.Rohrleitung.Grunddaten.KnotenAblauf;
|
||||
inspektionsobjekt.Inspektionsrichtung = src.OptischeInspektion.Rohrleitung.Inspektionsrichtung;
|
||||
|
||||
|
||||
foreach(RZustand zustand in src.OptischeInspektion.Rohrleitung.Zustaende)
|
||||
{
|
||||
Inspektionskuerzeln inspektionskuerzeln = new Inspektionskuerzeln();
|
||||
inspektionskuerzeln.Station = zustand.Station;
|
||||
inspektionskuerzeln.Hauptkode = zustand.Inspektionskode;
|
||||
inspektionskuerzeln.Charakterisierung1 = zustand.Charakterisierung1;
|
||||
inspektionskuerzeln.Charakterisierung2 = zustand.Charakterisierung2;
|
||||
inspektionskuerzeln.ImVerbindung = zustand.Verbindung;
|
||||
inspektionskuerzeln.LageAmUmfangStart = Convert.ToUInt32(zustand.PositionVon);
|
||||
inspektionskuerzeln.LageAmUmfangEnde = Convert.ToUInt32(zustand.PositionBis);
|
||||
|
||||
Quantifizierung quant1 = zustand.Quantifizierung1;
|
||||
Quantifizierung quant2 = zustand.Quantifizierung2;
|
||||
|
||||
inspektionskuerzeln.Quantifizierung1 = Convert.ToUInt32(quant1.Numerisch);
|
||||
inspektionskuerzeln.Quantifizierung2 = Convert.ToUInt32(quant2.Numerisch);
|
||||
|
||||
inspektionskuerzelns.Add(inspektionskuerzeln);
|
||||
}
|
||||
|
||||
inspektionsobjekt.Schadenskuerzeln = inspektionskuerzelns;
|
||||
result.Add(inspektionsobjekt);
|
||||
}
|
||||
|
||||
return result;
|
||||
*/
|
||||
return new List<IInspektionsobjekt>();
|
||||
}
|
||||
}
|
||||
}
|
||||
39
SanSystem/SchnittstelleImporter/ImportBuilder.cs
Normal file
39
SanSystem/SchnittstelleImporter/ImportBuilder.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using SanShared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SchnittstelleImporter
|
||||
{
|
||||
/// <summary>
|
||||
/// Definiert die Importierbare Schnittstellen
|
||||
/// </summary>
|
||||
public enum ImportSchnittstellen
|
||||
{
|
||||
/// <summary>
|
||||
/// Euronorm XML 2006
|
||||
/// </summary>
|
||||
XML2006
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class ImportBuilder
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static IImportedObjekte Import(ImportSchnittstellen importSchnittstellen)
|
||||
{
|
||||
switch (importSchnittstellen)
|
||||
{
|
||||
case ImportSchnittstellen.XML2006: return new I2006XML();
|
||||
default: throw new Exception("Gewünschte Schnittstelle nicht implementiert");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
45
SanSystem/SchnittstelleImporter/XML2006/Anschlussdaten.cs
Normal file
45
SanSystem/SchnittstelleImporter/XML2006/Anschlussdaten.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SchnittstelleImporter.XML2006
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Anschlussdaten
|
||||
{
|
||||
string objektbezeichnung;
|
||||
EKantenTyp kantentyp;
|
||||
decimal entfernung;
|
||||
string anschlussArt;
|
||||
string fixierung;
|
||||
string kommentar;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Objektbezeichnung { get => objektbezeichnung; set => objektbezeichnung = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public EKantenTyp Kantentyp { get => kantentyp; set => kantentyp = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal Entfernung { get => entfernung; set => entfernung = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string AnschlussArt { get => anschlussArt; set => anschlussArt = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Fixierung { get => fixierung; set => fixierung = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Kommentar { get => kommentar; set => kommentar = value; }
|
||||
}
|
||||
}
|
||||
112
SanSystem/SchnittstelleImporter/XML2006/Enums.cs
Normal file
112
SanSystem/SchnittstelleImporter/XML2006/Enums.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SchnittstelleImporter.XML2006
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum EAnlagetyp
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Haltung = 1,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Anschlussleitung = 2,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Schacht = 3,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Bauwerk = 4
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
enum EInspektionverfahren
|
||||
{
|
||||
TVUntersuchung,
|
||||
Begehung,
|
||||
VomSchacht,
|
||||
Other
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
enum EWetter
|
||||
{
|
||||
KEINNIEDERSCHLAG = 1,
|
||||
REGEN = 2,
|
||||
SCHNEE = 3
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum ERohrleitungstyp
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
HALTUNG,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
LEITUNG
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
enum EObjektArt
|
||||
{
|
||||
KANTE = 1,
|
||||
KNOTEN = 2
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum EKnotenTyp
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SCHACHT = 0,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
ANSCHLUSSPUNKT = 1,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
BAUWERK = 2
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum EKantenTyp
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
HALTUNG,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
LEITUNG,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
RINNE,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
GERINNE
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SchnittstelleImporter.XML2006
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public sealed class InspizierteAbwassertechnischeAnlage
|
||||
{
|
||||
string objektbezeichnung;
|
||||
Lage lage;
|
||||
EAnlagetyp anlagentyp;
|
||||
OptischeInspektion optischeInspektion;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Objektbezeichnung
|
||||
{
|
||||
get
|
||||
{
|
||||
return objektbezeichnung;
|
||||
}
|
||||
set
|
||||
{
|
||||
objektbezeichnung = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public EAnlagetyp Anlagentyp
|
||||
{
|
||||
get
|
||||
{
|
||||
return anlagentyp;
|
||||
}
|
||||
set
|
||||
{
|
||||
anlagentyp = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public OptischeInspektion OptischeInspektion
|
||||
{
|
||||
get
|
||||
{
|
||||
return optischeInspektion;
|
||||
}
|
||||
set
|
||||
{
|
||||
optischeInspektion = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Lage Lage
|
||||
{
|
||||
get
|
||||
{
|
||||
return lage;
|
||||
}
|
||||
set
|
||||
{
|
||||
lage = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return objektbezeichnung;
|
||||
}
|
||||
}
|
||||
}
|
||||
55
SanSystem/SchnittstelleImporter/XML2006/Lage.cs
Normal file
55
SanSystem/SchnittstelleImporter/XML2006/Lage.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SchnittstelleImporter.XML2006
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Lage
|
||||
{
|
||||
string strassename;
|
||||
string ortname;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Strassename
|
||||
{
|
||||
get
|
||||
{
|
||||
return strassename;
|
||||
}
|
||||
set
|
||||
{
|
||||
strassename = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Ortname
|
||||
{
|
||||
get
|
||||
{
|
||||
return ortname;
|
||||
}
|
||||
set
|
||||
{
|
||||
ortname = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="strassename"></param>
|
||||
/// <param name="ortname"></param>
|
||||
public Lage(string strassename, string ortname)
|
||||
{
|
||||
this.strassename = strassename;
|
||||
this.ortname = ortname;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SchnittstelleImporter.XML2006
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class OptischeInspektion
|
||||
{
|
||||
DateTime inspektionstime;
|
||||
Rohrleitung rohrleitung;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime Inspektionstime
|
||||
{
|
||||
set
|
||||
{
|
||||
inspektionstime = value;
|
||||
}
|
||||
get
|
||||
{
|
||||
return inspektionstime;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Inspektionsdatum
|
||||
{
|
||||
get
|
||||
{
|
||||
return inspektionstime.ToShortDateString();
|
||||
}
|
||||
/*set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
//inspektionsdatum = value;
|
||||
}*/
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Inspektionszeit
|
||||
{
|
||||
get
|
||||
{
|
||||
return inspektionstime.ToShortTimeString();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Rohrleitung Rohrleitung
|
||||
{
|
||||
get
|
||||
{
|
||||
return rohrleitung;
|
||||
}
|
||||
set
|
||||
{
|
||||
rohrleitung = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
100
SanSystem/SchnittstelleImporter/XML2006/RGrunddaten.cs
Normal file
100
SanSystem/SchnittstelleImporter/XML2006/RGrunddaten.cs
Normal file
@@ -0,0 +1,100 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SchnittstelleImporter.XML2006
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class RGrunddaten
|
||||
{
|
||||
string knotenZulauf;
|
||||
EKnotenTyp knotenZulaufTyp;
|
||||
string knotenAblauf;
|
||||
EKnotenTyp knotenAblaufTyp;
|
||||
int profilhoehe;
|
||||
int profilbreite;
|
||||
int profilart;
|
||||
string material;
|
||||
string kanalart;
|
||||
Anschlussdaten anschlussddaten = null;
|
||||
int herkunftProfilmasse;
|
||||
int herkunftMaterial;
|
||||
decimal regeleinzelrohrlaenge;
|
||||
int artAuskleidung;
|
||||
string innenschutz;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string KnotenZulauf { get => knotenZulauf; set => knotenZulauf = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public EKnotenTyp KnotenZulaufTyp { get => knotenZulaufTyp; set => knotenZulaufTyp = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string KnotenAblauf { get => knotenAblauf; set => knotenAblauf = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public EKnotenTyp KnotenAblaufTyp { get => knotenAblaufTyp; set => knotenAblaufTyp = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int Profilhoehe { get => profilhoehe; set => profilhoehe = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int Profilbreite { get => profilbreite; set => profilbreite = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int Profilart { get => profilart; set => profilart = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Material { get => material; set => material = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Kanalart { get => kanalart; set => kanalart = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Anschlussdaten Anschlussddaten { get => anschlussddaten; set => anschlussddaten = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int HerkunftProfilmasse { get => herkunftProfilmasse; set => herkunftProfilmasse = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int HerkunftMaterial { get => herkunftMaterial; set => herkunftMaterial = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal Regeleinzelrohrlaenge { get => regeleinzelrohrlaenge; set => regeleinzelrohrlaenge = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int ArtAuskleidung { get => artAuskleidung; set => artAuskleidung = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool HasGrundleitung
|
||||
{
|
||||
get
|
||||
{
|
||||
return anschlussddaten != null;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Innenschutz { get => innenschutz; set => innenschutz = value; }
|
||||
}
|
||||
}
|
||||
102
SanSystem/SchnittstelleImporter/XML2006/RZustand.cs
Normal file
102
SanSystem/SchnittstelleImporter/XML2006/RZustand.cs
Normal file
@@ -0,0 +1,102 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SchnittstelleImporter.XML2006
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public struct Quantifizierung
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal Numerisch;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Text;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public override string ToString()
|
||||
{
|
||||
if (Text != null)
|
||||
return Text;
|
||||
if (Numerisch == 0)
|
||||
return "";
|
||||
return Numerisch.ToString();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class RZustand
|
||||
{
|
||||
decimal station;
|
||||
string inspektionskode;
|
||||
string charakterisierung1;
|
||||
string charakterisierung2;
|
||||
bool verbindung;
|
||||
Quantifizierung quantifizierung1;
|
||||
Quantifizierung quantifizierung2;
|
||||
string streckenschaden;
|
||||
int streckenschadennr;
|
||||
int positionVon;
|
||||
int positionBis;
|
||||
string kommentar;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal Station { get => station; set => station = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Inspektionskode { get => inspektionskode; set => inspektionskode = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Charakterisierung1 { get => charakterisierung1; set => charakterisierung1 = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Charakterisierung2 { get => charakterisierung2; set => charakterisierung2 = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool Verbindung { get => verbindung; set => verbindung = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Quantifizierung Quantifizierung1 { get => quantifizierung1; set => quantifizierung1 = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Quantifizierung Quantifizierung2 { get => quantifizierung2; set => quantifizierung2 = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Streckenschaden { get => streckenschaden; set => streckenschaden = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int Streckenschadennr { get => streckenschadennr; set => streckenschadennr = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int PositionVon { get => positionVon; set => positionVon = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int PositionBis { get => positionBis; set => positionBis = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Kommentar { get => kommentar; set => kommentar = value; }
|
||||
}
|
||||
}
|
||||
96
SanSystem/SchnittstelleImporter/XML2006/Rohrleitung.cs
Normal file
96
SanSystem/SchnittstelleImporter/XML2006/Rohrleitung.cs
Normal file
@@ -0,0 +1,96 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SchnittstelleImporter.XML2006
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Rohrleitung
|
||||
{
|
||||
ERohrleitungstyp rohrleitungstyp;
|
||||
decimal inspektionslaenge;
|
||||
string inspektionsrichtung;
|
||||
RGrunddaten grunddaten = null;
|
||||
List<RZustand> zustaende = null;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public ERohrleitungstyp Rohrleitungstyp
|
||||
{
|
||||
get
|
||||
{
|
||||
return rohrleitungstyp;
|
||||
}
|
||||
set
|
||||
{
|
||||
rohrleitungstyp = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal Inspektionslaenge
|
||||
{
|
||||
get
|
||||
{
|
||||
return inspektionslaenge;
|
||||
}
|
||||
set
|
||||
{
|
||||
inspektionslaenge = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Inspektionsrichtung
|
||||
{
|
||||
get
|
||||
{
|
||||
switch (inspektionsrichtung)
|
||||
{
|
||||
case "U": return "Gegen Fliessrichtung";
|
||||
case "O": return "In Fliessrichtung";
|
||||
default: return "Fliessrichtungangabe nicht bekannt(" + inspektionsrichtung + ")";
|
||||
}
|
||||
|
||||
}
|
||||
set
|
||||
{
|
||||
inspektionsrichtung = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<RZustand> Zustaende
|
||||
{
|
||||
get
|
||||
{
|
||||
return zustaende;
|
||||
}
|
||||
set
|
||||
{
|
||||
zustaende = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public RGrunddaten Grunddaten
|
||||
{
|
||||
get
|
||||
{
|
||||
return grunddaten;
|
||||
}
|
||||
set
|
||||
{
|
||||
grunddaten = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,289 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!-- XML-Schema f<>r ISYBAU-Austauschformat Datenbereich Betriebsdaten -->
|
||||
<!-- Letzte Bearbeitung: 31.08.2007 -->
|
||||
<!-- Formatversion 0610 -->
|
||||
<xsd:schema xmlns="http://www.ofd-hannover.la/Identifikation" xmlns:isy="http://www.ofd-hannover.la/Identifikation" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.ofd-hannover.la/Identifikation" elementFormDefault="qualified">
|
||||
<xsd:include schemaLocation=".\0610-referenzlisten.xsd"/>
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="de">ISYBAU-Austauschformat Datenbereich Betriebsdaten</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType name="BetriebsdatenType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Kennung">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:minLength value="5"/>
|
||||
<xsd:maxLength value="5"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Beschreibung" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="100"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Beobachtungen" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Grundwasser" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="GWMessstelle" type="GWMessstelleType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Boden" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Bodenkennwerte" type="BodenkennwerteType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="DokumenteType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Dokumentname">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="40"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Dateiname">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="255"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Dokumentquelle">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="40"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Kommentar" type="xsd:token" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="GWMessstelleType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Bezeichnung">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="30"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Erlaeuterung" type="xsd:token" minOccurs="0"/>
|
||||
<xsd:element name="Erstellungsdatum" type="xsd:date" minOccurs="0"/>
|
||||
<xsd:element name="Umfeld">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="30"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Bodenkennwerte" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="30"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Standort" type="StandortType" minOccurs="0"/>
|
||||
<xsd:element name="NwPeilrohr" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:integer">
|
||||
<xsd:totalDigits value="3"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="HoeheROK" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:totalDigits value="6"/>
|
||||
<xsd:fractionDigits value="2"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Filterbeginn" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:totalDigits value="4"/>
|
||||
<xsd:fractionDigits value="2"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Filterende" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:totalDigits value="4"/>
|
||||
<xsd:fractionDigits value="2"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Endteufe" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:totalDigits value="4"/>
|
||||
<xsd:fractionDigits value="2"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Zyklus" type="BeobachtungszyklusGWType" minOccurs="0"/>
|
||||
<xsd:element name="Messungen" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Messung" type="MessungType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Dokumente" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Dokument" type="DokumenteType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="MessungType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Ablesedatum" type="xsd:date" minOccurs="0"/>
|
||||
<xsd:element name="Messwert">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:totalDigits value="4"/>
|
||||
<xsd:fractionDigits value="2"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Kommentar" type="xsd:token" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="BodenkennwerteType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Bezeichnung">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="30"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Erlaeuterung" type="xsd:token" minOccurs="0"/>
|
||||
<xsd:element name="Umfeld">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="30"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Standort" type="StandortType" minOccurs="0"/>
|
||||
<xsd:element name="ArtUntersuchung" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="UntersuchungBodenType"/>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="GWFlurabstand" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:totalDigits value="5"/>
|
||||
<xsd:fractionDigits value="2"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="massgBodenart" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="4"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="massgKfWert" type="xsd:double" minOccurs="0"/>
|
||||
<xsd:element name="Bodenschichten" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Bodenschicht" type="BodenschichtType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Dokumente" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Dokument" type="DokumenteType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="BodenschichtType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="obereSchichtgrenze" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:totalDigits value="4"/>
|
||||
<xsd:fractionDigits value="2"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="untereSchichtgrenze" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:totalDigits value="4"/>
|
||||
<xsd:fractionDigits value="2"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Bodenart" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="4"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="KfWert" type="xsd:double" minOccurs="0"/>
|
||||
<xsd:element name="Bestimmungsmethode" type="BestimmungkfType" minOccurs="0"/>
|
||||
<xsd:element name="Kommentar" type="xsd:token" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="StandortType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Rechtswert">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:totalDigits value="11"/>
|
||||
<xsd:fractionDigits value="3"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Hochwert">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:totalDigits value="10"/>
|
||||
<xsd:fractionDigits value="3"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="HoeheGOK">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:totalDigits value="7"/>
|
||||
<xsd:fractionDigits value="3"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Lagegenauigkeitsstufe">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="LagestufeType"/>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,478 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!-- XML-Schema f<>r ISYBAU-Austauschformat Datenbereich Metadaten -->
|
||||
<!-- Letzte Bearbeitung: 31.08.2007 -->
|
||||
<!-- Formatversion 0610 -->
|
||||
<xsd:schema xmlns="http://www.ofd-hannover.la/Identifikation" xmlns:isy="http://www.ofd-hannover.la/Identifikation" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.ofd-hannover.la/Identifikation" elementFormDefault="qualified">
|
||||
<xsd:include schemaLocation=".\0610-stammdaten.xsd"/>
|
||||
<xsd:include schemaLocation=".\0610-zustandsdaten.xsd"/>
|
||||
<xsd:include schemaLocation=".\0610-referenzlisten.xsd"/>
|
||||
<xsd:include schemaLocation=".\0610-hydraulikdaten.xsd"/>
|
||||
<xsd:include schemaLocation=".\0610-betriebsdaten.xsd"/>
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="de">ISYBAU-Austauschformat Datenbereich Metadaten</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:element name="Identifikation">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Version" type="xsd:gYearMonth"/>
|
||||
<xsd:element name="Admindaten" type="AdmindatenType"/>
|
||||
<xsd:element name="Datenkollektive" type="DatenkollektiveType">
|
||||
<xsd:key name="MKollektivKey">
|
||||
<xsd:selector xpath="isy:Kennungen/isy:Kollektiv"/>
|
||||
<xsd:field xpath="isy:Kennung"/>
|
||||
</xsd:key>
|
||||
<xsd:unique name="SKollektivKey">
|
||||
<xsd:selector xpath="isy:Stammdatenkollektiv"/>
|
||||
<xsd:field xpath="isy:Kennung"/>
|
||||
</xsd:unique>
|
||||
<xsd:keyref name="SKollektivRef" refer="MKollektivKey">
|
||||
<xsd:selector xpath="isy:Stammdatenkollektiv"/>
|
||||
<xsd:field xpath="isy:Kennung"/>
|
||||
</xsd:keyref>
|
||||
<xsd:unique name="ZKollektivKey">
|
||||
<xsd:selector xpath="isy:Zustandsdatenkollektiv"/>
|
||||
<xsd:field xpath="isy:Kennung"/>
|
||||
</xsd:unique>
|
||||
<xsd:keyref name="ZKollektivRef" refer="MKollektivKey">
|
||||
<xsd:selector xpath="isy:Zustandsdatenkollektiv"/>
|
||||
<xsd:field xpath="isy:Kennung"/>
|
||||
</xsd:keyref>
|
||||
<xsd:unique name="HKollektivKey">
|
||||
<xsd:selector xpath="isy:Hydraulikdatenkollektiv"/>
|
||||
<xsd:field xpath="isy:Kennung"/>
|
||||
</xsd:unique>
|
||||
<xsd:keyref name="HKollektivRef" refer="MKollektivKey">
|
||||
<xsd:selector xpath="isy:Hydraulikdatenkollektiv"/>
|
||||
<xsd:field xpath="isy:Kennung"/>
|
||||
</xsd:keyref>
|
||||
<xsd:unique name="BKollektivKey">
|
||||
<xsd:selector xpath="isy:Betriebsdatenkollektiv"/>
|
||||
<xsd:field xpath="isy:Kennung"/>
|
||||
</xsd:unique>
|
||||
<xsd:keyref name="BKollektivRef" refer="MKollektivKey">
|
||||
<xsd:selector xpath="isy:Betriebsdatenkollektiv"/>
|
||||
<xsd:field xpath="isy:Kennung"/>
|
||||
</xsd:keyref>
|
||||
<xsd:unique name="UmfeldKey">
|
||||
<xsd:selector xpath="isy:Stammdatenkollektiv/isy:Umfelder/isy:Umfeld"/>
|
||||
<xsd:field xpath="isy:Bezeichnung"/>
|
||||
</xsd:unique>
|
||||
<xsd:keyref name="SUmfeldRef" refer="UmfeldKey">
|
||||
<xsd:selector xpath="isy:Stammdatenkollektiv/isy:AbwassertechnischeAnlage/isy:Knoten/isy:Bauwerk/isy:Versickerungsanlage"/>
|
||||
<xsd:field xpath="isy:Umfeld"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="BoUmfeldRef" refer="UmfeldKey">
|
||||
<xsd:selector xpath="isy:Betriebsdatenkollektiv/isy:Beobachtungen/isy:Boden/isy:Bodenkennwerte"/>
|
||||
<xsd:field xpath="isy:Umfeld"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="GwUmfeldRef" refer="UmfeldKey">
|
||||
<xsd:selector xpath="isy:Betriebsdatenkollektiv/isy:Beobachtungen/isy:Grundwasser/isy:GWMessstelle"/>
|
||||
<xsd:field xpath="isy:Umfeld"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="HStammKollektivRef" refer="MKollektivKey">
|
||||
<xsd:selector xpath="isy:Hydraulikdatenkollektiv/isy:Rechennetz"/>
|
||||
<xsd:field xpath="isy:Stammdatenkennung"/>
|
||||
</xsd:keyref>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:complexType name="AdmindatenType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Liegenschaft" type="LiegenschaftType"/>
|
||||
<xsd:element name="Verwaltung" type="VerwaltungType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="LiegenschaftType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Liegenschaftsnummer">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="20"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Objektnummer" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="4"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Liegenschaftsbezeichnung">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="40"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Liegenschaftsstrasse" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="40"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="LiegenschaftsPLZ" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:minLength value="5"/>
|
||||
<xsd:maxLength value="5"/>
|
||||
<xsd:pattern value="\p{N}{5}"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Liegenschaftsort" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="40"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Liegenschaftsnutzung" type="xsd:token" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="VerwaltungType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Zustaendigkeit" type="ZustaendigkeitType" minOccurs="0"/>
|
||||
<xsd:element name="DienststelleVerwaltend" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="40"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="DienststelleHausverwaltend" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="40"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="DienststelleBauaufsicht" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="40"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="DienststelleBaudurchfuehrung" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="40"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="NummerDienststelleBaudurchfuehrung" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="5"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Zustaendigkeitsbereich" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="10"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Aktenzeichen" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="15"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Abwasserbeseitigungspflicht" type="AbwasserbeseitigungspflichtType" minOccurs="0"/>
|
||||
<xsd:element name="Wasserbehoerde" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="40"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="AblaufEinleitungsgenehmigung" type="xsd:date" minOccurs="0"/>
|
||||
<xsd:element name="Kommentar" type="xsd:token" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="DatenkollektiveType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Datenstatus" type="DatenstatusType"/>
|
||||
<xsd:element name="Erstellungsdatum" type="xsd:date"/>
|
||||
<xsd:element name="Kommentar" type="xsd:token" minOccurs="0"/>
|
||||
<xsd:element name="Kennungen">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Kollektiv" type="KollektivType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Stammdatenkollektiv" type="StammdatenType" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:key name="SObjektKey">
|
||||
<xsd:selector xpath="isy:AbwassertechnischeAnlage"/>
|
||||
<xsd:field xpath="isy:Objektbezeichnung"/>
|
||||
<xsd:field xpath="isy:Objektart"/>
|
||||
</xsd:key>
|
||||
<xsd:keyref name="UeberPumpeKey" refer="SObjektKey">
|
||||
<xsd:selector xpath="isy:AbwassertechnischeAnlage/isy:Knoten/isy:Bauwerk/isy:Pumpe/isy:UebergeordnetesBauwerk"/>
|
||||
<xsd:field xpath="isy:Objektbezeichnung"/>
|
||||
<xsd:field xpath="isy:Anlagentyp"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="UeberWehrKey" refer="SObjektKey">
|
||||
<xsd:selector xpath="isy:AbwassertechnischeAnlage/isy:Knoten/isy:Bauwerk/isy:Wehr_Ueberlauf/isy:UebergeordnetesBauwerk"/>
|
||||
<xsd:field xpath="isy:Objektbezeichnung"/>
|
||||
<xsd:field xpath="isy:Anlagentyp"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="UeberDrosselKey" refer="SObjektKey">
|
||||
<xsd:selector xpath="isy:AbwassertechnischeAnlage/isy:Knoten/isy:Bauwerk/isy:Drossel/isy:UebergeordnetesBauwerk"/>
|
||||
<xsd:field xpath="isy:Objektbezeichnung"/>
|
||||
<xsd:field xpath="isy:Anlagentyp"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="UeberSchieberKey" refer="SObjektKey">
|
||||
<xsd:selector xpath="isy:AbwassertechnischeAnlage/isy:Knoten/isy:Bauwerk/isy:Schieber/isy:UebergeordnetesBauwerk"/>
|
||||
<xsd:field xpath="isy:Objektbezeichnung"/>
|
||||
<xsd:field xpath="isy:Anlagentyp"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="UeberSiebKey" refer="SObjektKey">
|
||||
<xsd:selector xpath="isy:AbwassertechnischeAnlage/isy:Knoten/isy:Bauwerk/isy:Sieb/isy:UebergeordnetesBauwerk"/>
|
||||
<xsd:field xpath="isy:Objektbezeichnung"/>
|
||||
<xsd:field xpath="isy:Anlagentyp"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="UeberRechenKey" refer="SObjektKey">
|
||||
<xsd:selector xpath="isy:AbwassertechnischeAnlage/isy:Knoten/isy:Bauwerk/isy:Rechen/isy:UebergeordnetesBauwerk"/>
|
||||
<xsd:field xpath="isy:Objektbezeichnung"/>
|
||||
<xsd:field xpath="isy:Anlagentyp"/>
|
||||
</xsd:keyref>
|
||||
<xsd:key name="SAuftragKey">
|
||||
<xsd:selector xpath="isy:Auftraege/isy:Auftrag"/>
|
||||
<xsd:field xpath="isy:Auftragskennung"/>
|
||||
</xsd:key>
|
||||
<xsd:unique name="SAuftragBezKey">
|
||||
<xsd:selector xpath="isy:Auftraege/isy:Auftrag"/>
|
||||
<xsd:field xpath="isy:Auftragsbezeichnung"/>
|
||||
</xsd:unique>
|
||||
<xsd:keyref name="SAuftragRef" refer="SAuftragKey">
|
||||
<xsd:selector xpath="isy:AbwassertechnischeAnlage/isy:Sanierung/isy:Massnahme"/>
|
||||
<xsd:field xpath="isy:Auftragskennung"/>
|
||||
</xsd:keyref>
|
||||
<xsd:unique name="SKanteKey">
|
||||
<xsd:selector xpath="isy:AbwassertechnischeAnlage"/>
|
||||
<xsd:field xpath="isy:Objektbezeichnung"/>
|
||||
<xsd:field xpath="isy:Kante/isy:KantenTyp"/>
|
||||
</xsd:unique>
|
||||
<xsd:unique name="SKnotenKey">
|
||||
<xsd:selector xpath="isy:AbwassertechnischeAnlage"/>
|
||||
<xsd:field xpath="isy:Objektbezeichnung"/>
|
||||
<xsd:field xpath="isy:Knoten/isy:KnotenTyp"/>
|
||||
</xsd:unique>
|
||||
<xsd:keyref name="AnschlussHaltungKey" refer="SKanteKey">
|
||||
<xsd:selector xpath="isy:AbwassertechnischeAnlage/isy:Kante/isy:Haltung/isy:Anschlussdaten"/>
|
||||
<xsd:field xpath="isy:Objektbezeichnung"/>
|
||||
<xsd:field xpath="isy:Kantentyp"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="AnschlussLeitungKey" refer="SKanteKey">
|
||||
<xsd:selector xpath="isy:AbwassertechnischeAnlage/isy:Kante/isy:Leitung/isy:Anschlussdaten"/>
|
||||
<xsd:field xpath="isy:Objektbezeichnung"/>
|
||||
<xsd:field xpath="isy:Kantentyp"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="ZulaufKnotenKey" refer="SKnotenKey">
|
||||
<xsd:selector xpath="isy:AbwassertechnischeAnlage"/>
|
||||
<xsd:field xpath="isy:Kante/isy:KnotenZulauf"/>
|
||||
<xsd:field xpath="isy:Kante/isy:KnotenZulaufTyp"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="AblaufKnotenKey" refer="SKnotenKey">
|
||||
<xsd:selector xpath="isy:AbwassertechnischeAnlage"/>
|
||||
<xsd:field xpath="isy:Kante/isy:KnotenAblauf"/>
|
||||
<xsd:field xpath="isy:Kante/isy:KnotenAblaufTyp"/>
|
||||
</xsd:keyref>
|
||||
</xsd:element>
|
||||
<xsd:element name="Zustandsdatenkollektiv" type="ZustandsdatenType" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:unique name="ZObjektKey">
|
||||
<xsd:selector xpath="isy:InspizierteAbwassertechnischeAnlage"/>
|
||||
<xsd:field xpath="isy:Objektbezeichnung"/>
|
||||
<xsd:field xpath="isy:Anlagentyp"/>
|
||||
<xsd:field xpath="isy:OptischeInspektion/isy:Rohrleitung/isy:Inspektionsrichtung"/>
|
||||
</xsd:unique>
|
||||
<xsd:keyref name="ZObjektRef" refer="ZObjektKey">
|
||||
<xsd:selector xpath="isy:Filme/isy:Film/isy:FilmObjekte/isy:FilmObjekt"/>
|
||||
<xsd:field xpath="isy:Objektbezeichnung"/>
|
||||
<xsd:field xpath="isy:Typ"/>
|
||||
<xsd:field xpath="isy:Inspektionsrichtung"/>
|
||||
</xsd:keyref>
|
||||
<xsd:unique name="FObjektKey">
|
||||
<xsd:selector xpath="isy:Filme/isy:Film/isy:FilmObjekte/isy:FilmObjekt"/>
|
||||
<xsd:field xpath="isy:Objektbezeichnung"/>
|
||||
<xsd:field xpath="isy:Typ"/>
|
||||
<xsd:field xpath="isy:Inspektionsrichtung"/>
|
||||
</xsd:unique>
|
||||
<xsd:key name="UAuftragKey">
|
||||
<xsd:selector xpath="isy:Auftraege/isy:Auftrag"/>
|
||||
<xsd:field xpath="isy:Auftragskennung"/>
|
||||
</xsd:key>
|
||||
<xsd:unique name="UAuftragBezKey">
|
||||
<xsd:selector xpath="isy:Auftraege/isy:Auftrag"/>
|
||||
<xsd:field xpath="isy:Auftragsbezeichnung"/>
|
||||
</xsd:unique>
|
||||
<xsd:keyref name="IAuftragRef" refer="UAuftragKey">
|
||||
<xsd:selector xpath="isy:InspizierteAbwassertechnischeAnlage/isy:OptischeInspektion"/>
|
||||
<xsd:field xpath="isy:Auftragskennung"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="DAuftragRef" refer="UAuftragKey">
|
||||
<xsd:selector xpath="isy:InspizierteAbwassertechnischeAnlage/isy:Dichtheitspruefungen/isy:Pruefung"/>
|
||||
<xsd:field xpath="isy:Auftragskennung"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="FAuftragRef" refer="UAuftragKey">
|
||||
<xsd:selector xpath="isy:Filme/isy:Film"/>
|
||||
<xsd:field xpath="isy:Auftragskennung"/>
|
||||
</xsd:keyref>
|
||||
</xsd:element>
|
||||
<xsd:element name="Hydraulikdatenkollektiv" type="HydraulikdatenType" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:unique name="HVerfahrenKey">
|
||||
<xsd:selector xpath="isy:Verfahrensvorgaben/isy:Verfahren"/>
|
||||
<xsd:field xpath="isy:Verfahrenskennung"/>
|
||||
</xsd:unique>
|
||||
<xsd:unique name="HRechennetzObjektKey">
|
||||
<xsd:selector xpath="isy:Rechennetz/isy:HydraulikObjekte/isy:HydraulikObjekt"/>
|
||||
<xsd:field xpath="isy:Objektbezeichnung"/>
|
||||
<xsd:field xpath="isy:HydObjektTyp"/>
|
||||
</xsd:unique>
|
||||
<xsd:unique name="HGebietKey">
|
||||
<xsd:selector xpath="isy:Gebiete/isy:Gebiet"/>
|
||||
<xsd:field xpath="isy:Gebietskennung"/>
|
||||
</xsd:unique>
|
||||
<xsd:unique name="HFlaechenIDKey">
|
||||
<xsd:selector xpath="isy:Flaechen/isy:Flaeche"/>
|
||||
<xsd:field xpath="isy:Flaechennummer"/>
|
||||
</xsd:unique>
|
||||
<xsd:unique name="HFlaecheKey">
|
||||
<xsd:selector xpath="isy:Flaechen/isy:Flaeche"/>
|
||||
<xsd:field xpath="isy:Flaechenbezeichnung"/>
|
||||
</xsd:unique>
|
||||
<xsd:unique name="HNiederschlagKey">
|
||||
<xsd:selector xpath="isy:Systembelastungen/isy:Niederschlaege/isy:Niederschlag"/>
|
||||
<xsd:field xpath="isy:Niederschlagkennung"/>
|
||||
</xsd:unique>
|
||||
<xsd:unique name="HTrwKey">
|
||||
<xsd:selector xpath="isy:Systembelastungen/isy:Trockenwetterabflussspenden/isy:Trockenwetterabflussspende"/>
|
||||
<xsd:field xpath="isy:Trockenwetterkennung"/>
|
||||
</xsd:unique>
|
||||
<xsd:unique name="HEinleiterKey">
|
||||
<xsd:selector xpath="isy:Systembelastungen/isy:Einleiterkollektive/isy:Einleiterkollektiv"/>
|
||||
<xsd:field xpath="isy:Einleiterkollektivkennung"/>
|
||||
</xsd:unique>
|
||||
<xsd:unique name="HBerechnungKey">
|
||||
<xsd:selector xpath="isy:Berechnungen/isy:Berechnung/isy:BerechnungInfo"/>
|
||||
<xsd:field xpath="isy:Rechenlaufkennung"/>
|
||||
</xsd:unique>
|
||||
<xsd:keyref name="HFlaecheGebietRef" refer="HGebietKey">
|
||||
<xsd:selector xpath="isy:Flaechen/isy:Flaeche"/>
|
||||
<xsd:field xpath="isy:Gebietskennung"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="HFlaecheRef" refer="HFlaechenIDKey">
|
||||
<xsd:selector xpath="isy:Flaechen/isy:Flaeche/isy:Flaechenobjekt"/>
|
||||
<xsd:field xpath="isy:Flaechennummer"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="HFlaecheObjektRef" refer="HRechennetzObjektKey">
|
||||
<xsd:selector xpath="isy:Flaechen/isy:Flaeche/isy:HydraulikObjekt"/>
|
||||
<xsd:field xpath="isy:Objektbezeichnung"/>
|
||||
<xsd:field xpath="isy:HydObjektTyp"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="HEinzeleinleiterObjektRef" refer="HRechennetzObjektKey">
|
||||
<xsd:selector xpath="isy:Systembelastungen/isy:Einleiterkollektive/isy:Einleiterkollektiv/isy:ListeEinzeleinleiter/isy:Einzeleinleiter/isy:HydraulikObjekt"/>
|
||||
<xsd:field xpath="isy:Objektbezeichnung"/>
|
||||
<xsd:field xpath="isy:HydObjektTyp"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="HVerfahrenRef" refer="HVerfahrenKey">
|
||||
<xsd:selector xpath="isy:Berechnungen/isy:Berechnung/isy:BerechnungInfo"/>
|
||||
<xsd:field xpath="isy:Verfahrenskennung"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="HEinleiterRef" refer="HEinleiterKey">
|
||||
<xsd:selector xpath="isy:Berechnungen/isy:Berechnung/isy:BerechnungInfo"/>
|
||||
<xsd:field xpath="isy:Einleiterkollektivkennung"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="HTrwRef" refer="HTrwKey">
|
||||
<xsd:selector xpath="isy:Gebiete/isy:Gebiet"/>
|
||||
<xsd:field xpath="isy:Trockenwetterkennung"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="HNiederschlag1Ref" refer="HNiederschlagKey">
|
||||
<xsd:selector xpath="isy:Berechnungen/isy:Berechnung/isy:BerechnungInfo/isy:Niederschlagsbelastung/isy:GleichmaessigeUeberregnung"/>
|
||||
<xsd:field xpath="isy:Niederschlagkennung"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="HNiederschlag2Ref" refer="HNiederschlagKey">
|
||||
<xsd:selector xpath="isy:Berechnungen/isy:Berechnung/isy:BerechnungInfo/isy:Niederschlagsbelastung/isy:UngleichmaessigeUeberregnung/isy:FlaechenNiederschlag"/>
|
||||
<xsd:field xpath="isy:Niederschlagkennung"/>
|
||||
</xsd:keyref>
|
||||
<xsd:keyref name="HFlaeche2Ref" refer="HFlaechenIDKey">
|
||||
<xsd:selector xpath="isy:Berechnungen/isy:Berechnung/isy:BerechnungInfo/isy:Niederschlagsbelastung/isy:UngleichmaessigeUeberregnung/isy:FlaechenNiederschlag"/>
|
||||
<xsd:field xpath="isy:Flaechennummer"/>
|
||||
</xsd:keyref>
|
||||
</xsd:element>
|
||||
<xsd:element name="Betriebsdatenkollektiv" type="BetriebsdatenType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="Kostendatenkollektiv" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="KollektivType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Kennung">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:length value="5"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Kollektivart" type="KollektivartType"/>
|
||||
<xsd:element name="Kollektiveigenschaft">
|
||||
<xsd:complexType>
|
||||
<xsd:choice>
|
||||
<xsd:element name="Stammdaten" type="StammType"/>
|
||||
<xsd:element name="Zustandsdaten" type="ZustandType"/>
|
||||
<xsd:element name="Hydraulikdaten" type="HydraulikType"/>
|
||||
<xsd:element name="Betriebsdaten" type="BetriebType"/>
|
||||
<xsd:element name="Kostendaten">
|
||||
<xsd:complexType/>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Regelwerk" type="RegelwerkType"/>
|
||||
<xsd:element name="Bearbeitungsstand" type="xsd:date"/>
|
||||
<xsd:element name="Kommentar" type="xsd:token" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="StammType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Stammdatentyp">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="StammdatentypType"/>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Bautechnik" type="xsd:boolean"/>
|
||||
<xsd:element name="Geometrie" type="xsd:boolean"/>
|
||||
<xsd:element name="Sanierung" type="xsd:boolean"/>
|
||||
<xsd:element name="Umfeld" type="xsd:boolean"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ZustandType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Inspektion" type="xsd:boolean"/>
|
||||
<xsd:element name="Dichtheit" type="xsd:boolean"/>
|
||||
<xsd:element name="Film" type="xsd:boolean"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="HydraulikType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Verfahren" type="xsd:boolean"/>
|
||||
<xsd:element name="Rechennetz" type="xsd:boolean"/>
|
||||
<xsd:element name="Gebiet" type="xsd:boolean"/>
|
||||
<xsd:element name="Flaechen" type="xsd:boolean"/>
|
||||
<xsd:element name="Belastung" type="xsd:boolean"/>
|
||||
<xsd:element name="Berechnung" type="xsd:boolean"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="BetriebType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Beobachtung" type="xsd:boolean"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
286
SanSystem/SchnittstelleImporter/XML2006/XMLParser.cs
Normal file
286
SanSystem/SchnittstelleImporter/XML2006/XMLParser.cs
Normal file
@@ -0,0 +1,286 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
|
||||
namespace SchnittstelleImporter.XML2006
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class XMLParser
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static Dictionary<InspizierteAbwassertechnischeAnlage, string> anlageInFile = new Dictionary<InspizierteAbwassertechnischeAnlage, string>();
|
||||
/// <summary>
|
||||
/// Gibt eine Liste an anlagen zurück von einer XML Datei.
|
||||
/// </summary>
|
||||
/// <param name="xmldatei"></param>
|
||||
/// <returns></returns>
|
||||
public static List<InspizierteAbwassertechnischeAnlage> GetList(string xmldatei)
|
||||
{
|
||||
List<InspizierteAbwassertechnischeAnlage> result = new List<InspizierteAbwassertechnischeAnlage>();
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.Load(xmldatei);
|
||||
XmlNode rootChild = doc.LastChild;
|
||||
|
||||
XmlNamespaceManager manager = new XmlNamespaceManager(doc.NameTable);
|
||||
manager.AddNamespace("e", "http://www.ofd-hannover.la/Identifikation");
|
||||
XmlNode root = rootChild.SelectSingleNode("//e:Datenkollektive", manager);
|
||||
|
||||
XmlNode zstdk = root.SelectSingleNode("//e:Zustandsdatenkollektiv", manager);
|
||||
XmlNodeList inspizierteDaten = zstdk.SelectNodes("//e:InspizierteAbwassertechnischeAnlage", manager);
|
||||
|
||||
foreach (XmlNode node in inspizierteDaten)
|
||||
{
|
||||
InspizierteAbwassertechnischeAnlage anlage = GetAnlage(node);
|
||||
if (anlage == null) continue;
|
||||
result.Add(anlage);
|
||||
anlageInFile.Add(anlage, xmldatei);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
private static InspizierteAbwassertechnischeAnlage GetAnlage(XmlNode xml)
|
||||
{
|
||||
XmlNode intOptischeInspektion = null;
|
||||
XmlNode intRohrleitung = null;
|
||||
XmlNode intRGrunddaten = null;
|
||||
XmlNode intInspektionsdaten = null;
|
||||
|
||||
InspizierteAbwassertechnischeAnlage result = new InspizierteAbwassertechnischeAnlage();
|
||||
|
||||
foreach (XmlNode d in xml.ChildNodes)
|
||||
{
|
||||
switch (d.Name)
|
||||
{
|
||||
case "Objektbezeichnung":
|
||||
result.Objektbezeichnung = d.InnerText;
|
||||
break;
|
||||
case "Anlagentyp":
|
||||
result.Anlagentyp = (EAnlagetyp)Convert.ToInt32(d.InnerText); //anlagentyp = Convert.ToInt32(d.InnerText);
|
||||
break;
|
||||
case "Lage":
|
||||
//throw new NotImplementedException();
|
||||
if (!d.HasChildNodes) break;
|
||||
string strassename = "";
|
||||
string ortname = "";
|
||||
foreach (XmlNode _temp in d.ChildNodes)
|
||||
{
|
||||
switch (_temp.Name)
|
||||
{
|
||||
case "Strassenname": strassename = _temp.InnerText; break;
|
||||
case "Ortsteilname": ortname = _temp.InnerText; break;
|
||||
case "Strassenschluessel": break;
|
||||
default: throw new NotImplementedException(_temp.Name);
|
||||
}
|
||||
}
|
||||
result.Lage = new Lage(strassename, ortname);
|
||||
break;
|
||||
case "OptischeInspektion":
|
||||
intOptischeInspektion = d;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (intOptischeInspektion == null)
|
||||
throw new Exception("Es scheint was schief gelaufen zu sein, OptischeInspektion is null");
|
||||
|
||||
string datum = "";
|
||||
string time = "";
|
||||
|
||||
OptischeInspektion optischeInspektion = new OptischeInspektion();
|
||||
|
||||
foreach (XmlNode d in intOptischeInspektion)
|
||||
{
|
||||
switch (d.Name)
|
||||
{
|
||||
case "Inspektionsdatum":
|
||||
datum = d.InnerText;
|
||||
break;
|
||||
case "Uhrzeit":
|
||||
time = d.InnerText;
|
||||
break;
|
||||
case "Rohrleitung":
|
||||
intRohrleitung = d;
|
||||
break;
|
||||
}
|
||||
}
|
||||
string[] parseddatum = datum.Split('-');
|
||||
int year = Convert.ToInt32(parseddatum[0]);
|
||||
int month = Convert.ToInt32(parseddatum[1]);
|
||||
int day = Convert.ToInt32(parseddatum[2]);
|
||||
|
||||
string[] parsedtime = time.Split(':');
|
||||
int hour = Convert.ToInt32(parsedtime[0]);
|
||||
int minute = Convert.ToInt32(parsedtime[1]);
|
||||
int second = Convert.ToInt32(parsedtime[2]);
|
||||
DateTime dt = new DateTime(year, month, day, hour, minute, second);
|
||||
|
||||
optischeInspektion.Inspektionstime = dt;
|
||||
|
||||
if (intRohrleitung == null)
|
||||
return null;
|
||||
//throw new NotImplementedException("Schaechte sind noch nicht implementiert");
|
||||
|
||||
Rohrleitung rohr = new Rohrleitung();
|
||||
foreach (XmlNode d in intRohrleitung)
|
||||
{
|
||||
switch (d.Name)
|
||||
{
|
||||
case "Rohrleitungstyp":
|
||||
rohr.Rohrleitungstyp = (ERohrleitungstyp)Convert.ToInt32(d.InnerText);
|
||||
break;
|
||||
case "Inspektionslaenge":
|
||||
rohr.Inspektionslaenge = Convert.ToDecimal(d.InnerText.Replace('.', ','));
|
||||
break;
|
||||
case "Inspektionsrichtung":
|
||||
rohr.Inspektionsrichtung = d.InnerText;
|
||||
break;
|
||||
case "RGrunddaten":
|
||||
intRGrunddaten = d;
|
||||
break;
|
||||
case "Inspektionsdaten":
|
||||
intInspektionsdaten = d;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//List<RZustand> rzustand = ParseRZustand(intInspektionsdaten);
|
||||
|
||||
rohr.Grunddaten = ParseGrundDaten(intRGrunddaten);
|
||||
rohr.Zustaende = ParseRZustand(intInspektionsdaten);
|
||||
optischeInspektion.Rohrleitung = rohr;
|
||||
result.OptischeInspektion = optischeInspektion;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private static RGrunddaten ParseGrundDaten(XmlNode intRGrunddaten)
|
||||
{
|
||||
RGrunddaten grunddaten = new RGrunddaten();
|
||||
foreach (XmlNode d in intRGrunddaten.ChildNodes)
|
||||
{
|
||||
switch (d.Name)
|
||||
{
|
||||
case "KnotenZulauf": grunddaten.KnotenZulauf = d.InnerText; break;
|
||||
case "KnotenZulaufTyp": grunddaten.KnotenZulaufTyp = (EKnotenTyp)Convert.ToInt32(d.InnerText); break;
|
||||
case "KnotenAblauf": grunddaten.KnotenAblauf = d.InnerText; break;
|
||||
case "KnotenAblaufTyp": grunddaten.KnotenAblaufTyp = (EKnotenTyp)Convert.ToInt32(d.InnerText); break;
|
||||
case "HerkunftProfilmasse": grunddaten.HerkunftProfilmasse = Convert.ToInt32(d.InnerText); break;
|
||||
case "Profilhoehe": grunddaten.Profilhoehe = Convert.ToInt32(d.InnerText); break;
|
||||
case "Profilbreite": grunddaten.Profilbreite = Convert.ToInt32(d.InnerText); break;
|
||||
case "Profilart": grunddaten.Profilart = Convert.ToInt32(d.InnerText); break;
|
||||
case "HerkunftMaterial": grunddaten.HerkunftMaterial = Convert.ToInt32(d.InnerText); break;
|
||||
case "Material": grunddaten.Material = d.InnerText; break;
|
||||
case "Regeleinzelrohrlaenge": grunddaten.Regeleinzelrohrlaenge = Convert.ToDecimal(d.InnerText.Replace('.', ',')); break;
|
||||
case "ArtAuskleidung": grunddaten.ArtAuskleidung = Convert.ToInt32(d.InnerText); break;
|
||||
case "Kanalart": grunddaten.Kanalart = d.InnerText; break;
|
||||
case "Anschlussdaten": grunddaten.Anschlussddaten = ParseAnschlussdaten(d); break;
|
||||
case "Innenschutz": grunddaten.Innenschutz = d.InnerText; break;
|
||||
default: throw new NotImplementedException(d.Name);
|
||||
}
|
||||
}
|
||||
|
||||
return grunddaten;
|
||||
}
|
||||
|
||||
private static Anschlussdaten ParseAnschlussdaten(XmlNode anschlussdaten)
|
||||
{
|
||||
Anschlussdaten result = new Anschlussdaten();
|
||||
foreach (XmlNode d in anschlussdaten.ChildNodes)
|
||||
{
|
||||
switch (d.Name)
|
||||
{
|
||||
case "Objektbezeichnung": result.Objektbezeichnung = d.InnerText; break;
|
||||
case "Kantentyp": result.Kantentyp = (EKantenTyp)Convert.ToInt32(d.InnerText); break;
|
||||
case "Entfernung": result.Entfernung = Convert.ToDecimal(d.InnerText.Replace('.', ',')); break;
|
||||
case "Fixierung": result.Fixierung = d.InnerText; break;
|
||||
default: Trace.WriteLine(d.Name); break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private static List<RZustand> ParseRZustand(XmlNode node)
|
||||
{
|
||||
List<RZustand> result = new List<RZustand>();
|
||||
|
||||
foreach (XmlNode child in node.ChildNodes)
|
||||
{
|
||||
RZustand rZustand = new RZustand();
|
||||
foreach (XmlNode d in child.ChildNodes)
|
||||
{
|
||||
|
||||
switch (d.Name)
|
||||
{
|
||||
case "Station":
|
||||
rZustand.Station = Convert.ToDecimal(d.InnerText.Replace('.', ','));
|
||||
break;
|
||||
case "InspektionsKode":
|
||||
rZustand.Inspektionskode = d.InnerText;
|
||||
break;
|
||||
case "Charakterisierung1":
|
||||
rZustand.Charakterisierung1 = d.InnerText;
|
||||
break;
|
||||
case "Charakterisierung2":
|
||||
rZustand.Charakterisierung2 = d.InnerText;
|
||||
break;
|
||||
case "Verbindung":
|
||||
rZustand.Verbindung = d.InnerText.Equals("0") ? false : true;
|
||||
break;
|
||||
case "PositionVon":
|
||||
rZustand.PositionVon = Convert.ToInt32(d.InnerText);
|
||||
break;
|
||||
case "PositionBis":
|
||||
rZustand.PositionBis = Convert.ToInt32(d.InnerText);
|
||||
break;
|
||||
case "Quantifizierung1Numerisch":
|
||||
Quantifizierung quantifizierung1 = new Quantifizierung();
|
||||
quantifizierung1.Numerisch = Convert.ToDecimal(d.InnerText.Replace('.', ','));
|
||||
rZustand.Quantifizierung1 = quantifizierung1;
|
||||
break;
|
||||
case "Quantifizierung2Numerisch":
|
||||
Quantifizierung quantifizierung2 = new Quantifizierung();
|
||||
quantifizierung2.Numerisch = Convert.ToDecimal(d.InnerText.Replace('.', ','));
|
||||
rZustand.Quantifizierung1 = quantifizierung2;
|
||||
break;
|
||||
case "Quantifizierung1Text":
|
||||
Quantifizierung quantifizierung3 = new Quantifizierung();
|
||||
quantifizierung3.Text = d.InnerText;
|
||||
rZustand.Quantifizierung1 = quantifizierung3;
|
||||
break;
|
||||
case "Quantifizierung2Text":
|
||||
Quantifizierung quantifizierung4 = new Quantifizierung();
|
||||
quantifizierung4.Text = d.InnerText;
|
||||
rZustand.Quantifizierung2 = quantifizierung4;
|
||||
break;
|
||||
case "Frame": break;
|
||||
case "Klassifizierung": break;
|
||||
case "Kommentar": rZustand.Kommentar = d.InnerText; break;
|
||||
case "Streckenschaden": rZustand.Streckenschaden = d.InnerText; break;
|
||||
case "StreckenschadenLfdNr": rZustand.Streckenschadennr = Convert.ToInt32(d.InnerText); break;
|
||||
case "BezeichnungSanierung": break;
|
||||
case "RVerfahrenSanierung": break;
|
||||
case "Fotodatei": break;
|
||||
case "FotoSpeichermedium": break;
|
||||
case "Fotonummer": break;
|
||||
case "Timecode": break;
|
||||
case "GrundAbbruch": break;
|
||||
default: throw new NotImplementedException(d.Name);
|
||||
|
||||
}
|
||||
}
|
||||
result.Add(rZustand);
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
41
SanSystem/TempCAN/TemperaturBuilder.cs
Normal file
41
SanSystem/TempCAN/TemperaturBuilder.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SanShared;
|
||||
|
||||
namespace TempCAN
|
||||
{
|
||||
/// <summary>
|
||||
/// Auflistung der Schnittstellen
|
||||
/// </summary>
|
||||
public enum TemperaturSchnittstellen
|
||||
{
|
||||
/// <summary>
|
||||
/// Tinkerforge schnittstelle
|
||||
/// </summary>
|
||||
TINKERFORGE
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class TemperaturBuilder
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static ITemperature Temperatur(TemperaturSchnittstellen temperaturSchnittstellen)
|
||||
{
|
||||
switch(temperaturSchnittstellen)
|
||||
{
|
||||
case TemperaturSchnittstellen.TINKERFORGE:
|
||||
return new TinkerForgeTemperatur();
|
||||
|
||||
|
||||
default:
|
||||
throw new Exception();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
68
SanSystem/TempCAN/TinkerForgeTemperatur.cs
Normal file
68
SanSystem/TempCAN/TinkerForgeTemperatur.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SanShared;
|
||||
using Tinkerforge;
|
||||
|
||||
namespace TempCAN
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class TinkerForgeTemperatur : ITemperature
|
||||
{
|
||||
private static string HOST = "localhost";
|
||||
private static int PORT = 4223;
|
||||
private static string UID = "dW3";
|
||||
double temperatur;
|
||||
bool erfolg = true;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public TinkerForgeTemperatur()
|
||||
{
|
||||
IPConnection ipcon = new IPConnection();
|
||||
BrickletTemperature t = new BrickletTemperature(UID, ipcon);
|
||||
try
|
||||
{
|
||||
ipcon.Connect(HOST, PORT);
|
||||
}
|
||||
catch(Exception)
|
||||
{
|
||||
erfolg = false;
|
||||
ipcon = null;
|
||||
t = null;
|
||||
return;
|
||||
}
|
||||
|
||||
short temp;
|
||||
try
|
||||
{
|
||||
temp = t.GetTemperature();
|
||||
|
||||
}
|
||||
catch(Tinkerforge.TimeoutException)
|
||||
{
|
||||
temp = 100;
|
||||
erfolg = false;
|
||||
}
|
||||
temperatur = (temp / 100.0);
|
||||
ipcon.Disconnect();
|
||||
t = null;
|
||||
ipcon = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public double GetTemperatur(out string message)
|
||||
{
|
||||
message = "";
|
||||
if (!erfolg) message = "Es konnte keine Verbindung mit der TemperaturSystem aufgebaut werden";
|
||||
return temperatur;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -190,6 +190,7 @@ namespace SanSystem
|
||||
|
||||
private void stammdatenImportierenToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
/*
|
||||
OpenFileDialog openFileDialog = new OpenFileDialog();
|
||||
openFileDialog.Filter = "XML Daten | *.xml";
|
||||
if(Datenbank.Instance.loadedProjekt == null)
|
||||
@@ -220,6 +221,7 @@ namespace SanSystem
|
||||
strassenList.StartPosition = FormStartPosition.Manual;
|
||||
strassenList.Show();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
private void auftraggeberToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
||||
@@ -4,11 +4,17 @@
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
|
||||
<package id="Syncfusion.Chart.Base" version="19.4.0.56" targetFramework="net472" />
|
||||
<package id="Syncfusion.Chart.Windows" version="19.4.0.56" targetFramework="net472" />
|
||||
<package id="Syncfusion.Compression.Base" version="19.4.0.56" targetFramework="net472" />
|
||||
<package id="Syncfusion.Core.WinForms" version="19.4.0.56" targetFramework="net472" />
|
||||
<package id="Syncfusion.DocIO.WinForms" version="19.4.0.56" targetFramework="net472" />
|
||||
<package id="Syncfusion.DocToPDFConverter.WinForms" version="19.4.0.56" targetFramework="net472" />
|
||||
<package id="Syncfusion.Grid.Base" version="19.4.0.56" targetFramework="net472" />
|
||||
<package id="Syncfusion.Grid.Windows" version="19.4.0.56" targetFramework="net472" />
|
||||
<package id="Syncfusion.Grouping.Base" version="19.4.0.56" targetFramework="net472" />
|
||||
<package id="Syncfusion.Licensing" version="19.4.0.56" targetFramework="net472" />
|
||||
<package id="Syncfusion.OfficeChart.Base" version="19.4.0.56" targetFramework="net472" />
|
||||
<package id="Syncfusion.Pdf.WinForms" version="19.4.0.56" targetFramework="net472" />
|
||||
<package id="Syncfusion.PdfViewer.Windows" version="19.4.0.56" targetFramework="net472" />
|
||||
<package id="Syncfusion.SfInput.WinForms" version="19.4.0.56" targetFramework="net472" />
|
||||
<package id="Syncfusion.SfSpellChecker.WPF" version="19.4.0.56" targetFramework="net472" />
|
||||
<package id="Syncfusion.Shared.Base" version="19.4.0.56" targetFramework="net472" />
|
||||
|
||||
Reference in New Issue
Block a user