XMLParser hinzugefügt

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

View File

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

40
Database/Datenbank.cs Normal file
View File

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

View File

@@ -50,12 +50,5 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Strasse.cs" />
</ItemGroup>
<ItemGroup>
<None Include="database.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -19,5 +19,10 @@ namespace KlassenBIB
{
Objekte = new AbwasserTechnischeAnlageCollection();
}
public override string ToString()
{
return Strassename;
}
}
}

View File

@@ -1,10 +0,0 @@
<Projekt Nummer="16/219" Ort="Oldenburg" xmlns="http://schemas.cosysda.de/sanVerwaltung/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Strasse Ort="Oldenburg" Strassename="Dieselstraße">
<AbwasserTechnischeAnlageCollection Capacity="4">
<Inspektionsobjekt Objektbezeichnung="122345">
<Inspektionskuerzeln Anmerkung="{x:Null}" Charakterisierung2="{x:Null}" FotoReferenz="{x:Null}" VideoReferenz="{x:Null}" Charakterisierung1="XP" Hauptkode="BCD" ImVerbindung="False" LageAmUmfangEnde="0" LageAmUmfangStart="0" Quantifizierung1="0" Quantifizierung2="0" />
<Inspektionskuerzeln Anmerkung="{x:Null}" FotoReferenz="{x:Null}" VideoReferenz="{x:Null}" Charakterisierung1="A" Charakterisierung2="A" Hauptkode="BCA" ImVerbindung="False" LageAmUmfangEnde="0" LageAmUmfangStart="0" Quantifizierung1="150" Quantifizierung2="150" />
</Inspektionsobjekt>
</AbwasserTechnischeAnlageCollection>
</Strasse>
</Projekt>

View File

@@ -1,20 +0,0 @@
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 SanSystem
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}

View File

@@ -16,7 +16,7 @@ namespace SanSystem
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
Application.Run(new frmMain());
}
}
}

View File

@@ -45,14 +45,35 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<Compile Include="frmObjekteList.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
<Compile Include="frmObjekteList.Designer.cs">
<DependentUpon>frmObjekteList.cs</DependentUpon>
</Compile>
<Compile Include="frmStrassenList.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmStrassenList.Designer.cs">
<DependentUpon>frmStrassenList.cs</DependentUpon>
</Compile>
<Compile Include="frmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmMain.Designer.cs">
<DependentUpon>frmMain.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="frmObjekteList.resx">
<DependentUpon>frmObjekteList.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmStrassenList.resx">
<DependentUpon>frmStrassenList.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmMain.resx">
<DependentUpon>frmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
@@ -75,5 +96,15 @@
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Database\Database.csproj">
<Project>{b0227727-6cf9-4e2e-9afe-5dd76deaa9db}</Project>
<Name>Database</Name>
</ProjectReference>
<ProjectReference Include="..\KlassenBIB\KlassenBIB.csproj">
<Project>{c82bd650-466b-403f-bed9-2b1660771f54}</Project>
<Name>KlassenBIB</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -1,6 +1,6 @@
namespace SanSystem
{
partial class Form1
partial class frmMain
{
/// <summary>
/// Erforderliche Designervariable.
@@ -28,9 +28,20 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.SuspendLayout();
//
// frm_main
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Text = "Form1";
this.ClientSize = new System.Drawing.Size(795, 459);
this.IsMdiContainer = true;
this.Name = "frm_main";
this.Text = "Kanalsanierungsverwaltung";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frm_main_FormClosing);
this.Load += new System.EventHandler(this.frm_main_Load);
this.ResumeLayout(false);
}
#endregion

54
SanSystem/frmMain.cs Normal file
View File

@@ -0,0 +1,54 @@
using Database;
using KlassenBIB;
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 SanSystem
{
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
Datenbank.Instance.LoadProjekt("projekt1.xaml");
this.Width = Screen.PrimaryScreen.WorkingArea.Width;
this.Height = Screen.PrimaryScreen.WorkingArea.Height;
this.StartPosition = FormStartPosition.Manual;
this.Location = new Point(0, 0);
}
private void button1_Click(object sender, EventArgs e)
{
Projekt projekt = Datenbank.Instance.loadedProjekt;
AdresseCollection adressen = projekt.Adressen;
adressen[0].Objekte.Add(new Inspektionsobjekt()
{
Objektbezeichnung = "SW01"
});
Datenbank.Instance.SaveProjekt();
}
private void frm_main_Load(object sender, EventArgs e)
{
frmStrassenList strassenList = new frmStrassenList();
strassenList.MdiParent = this;
strassenList.Show();
}
private void frm_main_FormClosing(object sender, FormClosingEventArgs e)
{
Datenbank.Instance.SaveProjekt();
}
}
}

120
SanSystem/frmMain.resx Normal file
View 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>

75
SanSystem/frmObjekteList.Designer.cs generated Normal file
View File

@@ -0,0 +1,75 @@
namespace SanSystem
{
partial class frmObjekteList
{
/// <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.dGObjekte = new System.Windows.Forms.DataGridView();
this.button1 = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.dGObjekte)).BeginInit();
this.SuspendLayout();
//
// dGObjekte
//
this.dGObjekte.AllowUserToOrderColumns = true;
this.dGObjekte.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dGObjekte.Location = new System.Drawing.Point(12, 12);
this.dGObjekte.Name = "dGObjekte";
this.dGObjekte.RowTemplate.Height = 24;
this.dGObjekte.Size = new System.Drawing.Size(348, 163);
this.dGObjekte.TabIndex = 0;
//
// button1
//
this.button1.Location = new System.Drawing.Point(448, 51);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(136, 124);
this.button1.TabIndex = 1;
this.button1.Text = "button1";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// frmObjekteList
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(639, 253);
this.Controls.Add(this.button1);
this.Controls.Add(this.dGObjekte);
this.Name = "frmObjekteList";
this.Text = "frmObjekteList";
((System.ComponentModel.ISupportInitialize)(this.dGObjekte)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.DataGridView dGObjekte;
private System.Windows.Forms.Button button1;
}
}

View File

@@ -0,0 +1,42 @@
using KlassenBIB;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SanSystem
{
public partial class frmObjekteList : Form
{
ObservableCollection<Strasse> street = new ObservableCollection<Strasse>();
Strasse strasse = null;
public frmObjekteList(Strasse strasse)
{
InitializeComponent();
this.strasse = strasse;
dGObjekte.DataSource = street; //strasse.Objekte;
}
private void button1_Click(object sender, EventArgs e)
{
street.Add(new Strasse()
{
Strassename = "XSSD"
});
/*
strasse.Objekte.Add(new Inspektionsobjekt()
{
Objektbezeichnung = "1229292"
});
*/
}
}
}

View 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>

62
SanSystem/frmStrassenList.Designer.cs generated Normal file
View File

@@ -0,0 +1,62 @@
namespace SanSystem
{
partial class frmStrassenList
{
/// <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.lst_strassen = new System.Windows.Forms.ListBox();
this.SuspendLayout();
//
// lst_strassen
//
this.lst_strassen.FormattingEnabled = true;
this.lst_strassen.ItemHeight = 16;
this.lst_strassen.Location = new System.Drawing.Point(9, 19);
this.lst_strassen.Name = "lst_strassen";
this.lst_strassen.Size = new System.Drawing.Size(252, 340);
this.lst_strassen.TabIndex = 0;
this.lst_strassen.SelectedIndexChanged += new System.EventHandler(this.lst_strassen_SelectedIndexChanged);
//
// frmStrassenList
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(282, 392);
this.ControlBox = false;
this.Controls.Add(this.lst_strassen);
this.Name = "frmStrassenList";
this.Text = "frmStrassenList";
this.Load += new System.EventHandler(this.frmStrassenList_Load);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ListBox lst_strassen;
}
}

View File

@@ -0,0 +1,36 @@
using Database;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SanSystem
{
public partial class frmStrassenList : Form
{
public frmStrassenList()
{
InitializeComponent();
}
private void frmStrassenList_Load(object sender, EventArgs e)
{
lst_strassen.DataSource = Datenbank.Instance.loadedProjekt.Adressen;
}
private void lst_strassen_SelectedIndexChanged(object sender, EventArgs e)
{
KlassenBIB.Strasse strasse = ((sender as ListBox).SelectedItem as KlassenBIB.Strasse);
if (strasse == null) return;
frmObjekteList objekteList = new frmObjekteList(strasse);
objekteList.MdiParent = this.MdiParent;
objekteList.Show();
}
}
}

View 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>

View File

@@ -11,6 +11,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KlassenBIB", "KlassenBIB\Kl
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KlassenBIBTests", "KlassenBIBTests\KlassenBIBTests.csproj", "{0FEC903E-6C9F-48AC-A207-0BACA184AAA8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SchnittstelleImporter", "SchnittstelleImporter\SchnittstelleImporter.csproj", "{E1564A4D-39FD-489B-8029-AEEF33033EF2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -33,6 +35,10 @@ Global
{0FEC903E-6C9F-48AC-A207-0BACA184AAA8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0FEC903E-6C9F-48AC-A207-0BACA184AAA8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0FEC903E-6C9F-48AC-A207-0BACA184AAA8}.Release|Any CPU.Build.0 = Release|Any CPU
{E1564A4D-39FD-489B-8029-AEEF33033EF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E1564A4D-39FD-489B-8029-AEEF33033EF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E1564A4D-39FD-489B-8029-AEEF33033EF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E1564A4D-39FD-489B-8029-AEEF33033EF2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
[assembly: AssemblyTitle("SchnittstelleImporter")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SchnittstelleImporter")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
[assembly: ComVisible(false)]
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("e1564a4d-39fd-489b-8029-aeef33033ef2")]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//
// Hauptversion
// Nebenversion
// Buildnummer
// Revision
//
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{E1564A4D-39FD-489B-8029-AEEF33033EF2}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SchnittstelleImporter</RootNamespace>
<AssemblyName>SchnittstelleImporter</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="XML2006\Enums.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="XML2006\Anschlussdaten.cs" />
<Compile Include="XML2006\Functions.cs" />
<Compile Include="XML2006\InspizierteAbwassertechnischeAnlage.cs" />
<Compile Include="XML2006\Lage.cs" />
<Compile Include="XML2006\OptischeInspektion.cs" />
<Compile Include="XML2006\RGrunddaten.cs" />
<Compile Include="XML2006\Rohrleitung.cs" />
<Compile Include="XML2006\RZustand.cs" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchnittstelleImporter.XML2006
{
public class Anschlussdaten
{
string objektbezeichnung;
EKantenTyp kantentyp;
decimal entfernung;
string anschlussArt;
string fixierung;
string kommentar;
public string Objektbezeichnung { get => objektbezeichnung; set => objektbezeichnung = value; }
public EKantenTyp Kantentyp { get => kantentyp; set => kantentyp = value; }
public decimal Entfernung { get => entfernung; set => entfernung = value; }
public string AnschlussArt { get => anschlussArt; set => anschlussArt = value; }
public string Fixierung { get => fixierung; set => fixierung = value; }
public string Kommentar { get => kommentar; set => kommentar = value; }
}
}

View File

@@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchnittstelleImporter.XML2006
{
public enum EAnlagetyp
{
Haltung = 1,
Anschlussleitung = 2,
Schacht = 3,
Bauwerk = 4
}
public enum EInspektionverfahren
{
TVUntersuchung,
Begehung,
VomSchacht,
Other
}
public enum EWetter
{
KEINNIEDERSCHLAG = 1,
REGEN = 2,
SCHNEE = 3
}
public enum ERohrleitungstyp
{
HALTUNG,
LEITUNG
}
public enum EObjektArt
{
KANTE = 1,
KNOTEN = 2
}
public enum EKnotenTyp
{
SCHACHT = 0,
ANSCHLUSSPUNKT = 1,
BAUWERK = 2
}
public enum EKantenTyp
{
HALTUNG,
LEITUNG,
RINNE,
GERINNE
}
}

View File

@@ -0,0 +1,270 @@
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
{
public static class XMLParser
{
public static Dictionary<InspizierteAbwassertechnischeAnlage, string> anlageInFile = new Dictionary<InspizierteAbwassertechnischeAnlage, string>();
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);
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;
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)
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;
default: throw new NotImplementedException(d.Name);
}
}
result.Add(rZustand);
}
return result;
}
}
}

View File

@@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchnittstelleImporter.XML2006
{
public sealed class InspizierteAbwassertechnischeAnlage
{
string objektbezeichnung;
Lage lage;
EAnlagetyp anlagentyp;
OptischeInspektion optischeInspektion;
public string Objektbezeichnung
{
get
{
return objektbezeichnung;
}
set
{
objektbezeichnung = value;
}
}
public EAnlagetyp Anlagentyp
{
get
{
return anlagentyp;
}
set
{
anlagentyp = value;
}
}
public OptischeInspektion OptischeInspektion
{
get
{
return optischeInspektion;
}
set
{
optischeInspektion = value;
}
}
public Lage Lage
{
get
{
return lage;
}
set
{
lage = value;
}
}
public override string ToString()
{
return objektbezeichnung;
}
}
}

View File

@@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchnittstelleImporter.XML2006
{
public class Lage
{
string strassename;
string ortname;
public string Strassename
{
get
{
return strassename;
}
set
{
strassename = value;
}
}
public string Ortname
{
get
{
return ortname;
}
set
{
ortname = value;
}
}
public Lage(string strassename, string ortname)
{
this.strassename = strassename;
this.ortname = ortname;
}
}
}

View File

@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchnittstelleImporter.XML2006
{
public class OptischeInspektion
{
DateTime inspektionstime;
Rohrleitung rohrleitung;
public DateTime Inspektionstime
{
set
{
inspektionstime = value;
}
get
{
return inspektionstime;
}
}
public string Inspektionsdatum
{
get
{
return inspektionstime.ToShortDateString();
}
/*set
{
throw new NotImplementedException();
//inspektionsdatum = value;
}*/
}
public string Inspektionszeit
{
get
{
return inspektionstime.ToShortTimeString();
}
}
public Rohrleitung Rohrleitung
{
get
{
return rohrleitung;
}
set
{
rohrleitung = value;
}
}
}
}

View File

@@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchnittstelleImporter.XML2006
{
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;
public string KnotenZulauf { get => knotenZulauf; set => knotenZulauf = value; }
public EKnotenTyp KnotenZulaufTyp { get => knotenZulaufTyp; set => knotenZulaufTyp = value; }
public string KnotenAblauf { get => knotenAblauf; set => knotenAblauf = value; }
public EKnotenTyp KnotenAblaufTyp { get => knotenAblaufTyp; set => knotenAblaufTyp = value; }
public int Profilhoehe { get => profilhoehe; set => profilhoehe = value; }
public int Profilbreite { get => profilbreite; set => profilbreite = value; }
public int Profilart { get => profilart; set => profilart = value; }
public string Material { get => material; set => material = value; }
public string Kanalart { get => kanalart; set => kanalart = value; }
public Anschlussdaten Anschlussddaten { get => anschlussddaten; set => anschlussddaten = value; }
public int HerkunftProfilmasse { get => herkunftProfilmasse; set => herkunftProfilmasse = value; }
public int HerkunftMaterial { get => herkunftMaterial; set => herkunftMaterial = value; }
public decimal Regeleinzelrohrlaenge { get => regeleinzelrohrlaenge; set => regeleinzelrohrlaenge = value; }
public int ArtAuskleidung { get => artAuskleidung; set => artAuskleidung = value; }
public bool HasGrundleitung
{
get
{
return anschlussddaten != null;
}
}
public string Innenschutz { get => innenschutz; set => innenschutz = value; }
}
}

View File

@@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchnittstelleImporter.XML2006
{
public struct Quantifizierung
{
public decimal Numerisch;
public string Text;
public override string ToString()
{
if (Text != null)
return Text;
if (Numerisch == 0)
return "";
return Numerisch.ToString();
}
}
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;
public decimal Station { get => station; set => station = value; }
public string Inspektionskode { get => inspektionskode; set => inspektionskode = value; }
public string Charakterisierung1 { get => charakterisierung1; set => charakterisierung1 = value; }
public string Charakterisierung2 { get => charakterisierung2; set => charakterisierung2 = value; }
public bool Verbindung { get => verbindung; set => verbindung = value; }
public Quantifizierung Quantifizierung1 { get => quantifizierung1; set => quantifizierung1 = value; }
public Quantifizierung Quantifizierung2 { get => quantifizierung2; set => quantifizierung2 = value; }
public string Streckenschaden { get => streckenschaden; set => streckenschaden = value; }
public int Streckenschadennr { get => streckenschadennr; set => streckenschadennr = value; }
public int PositionVon { get => positionVon; set => positionVon = value; }
public int PositionBis { get => positionBis; set => positionBis = value; }
public string Kommentar { get => kommentar; set => kommentar = value; }
}
}

View File

@@ -0,0 +1,80 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchnittstelleImporter.XML2006
{
public class Rohrleitung
{
ERohrleitungstyp rohrleitungstyp;
decimal inspektionslaenge;
string inspektionsrichtung;
RGrunddaten grunddaten = null;
List<RZustand> zustaende = null;
public ERohrleitungstyp Rohrleitungstyp
{
get
{
return rohrleitungstyp;
}
set
{
rohrleitungstyp = value;
}
}
public decimal Inspektionslaenge
{
get
{
return inspektionslaenge;
}
set
{
inspektionslaenge = value;
}
}
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;
}
}
public List<RZustand> Zustaende
{
get
{
return zustaende;
}
set
{
zustaende = value;
}
}
public RGrunddaten Grunddaten
{
get
{
return grunddaten;
}
set
{
grunddaten = value;
}
}
}
}