diff --git a/BerichtGen/Bericht.cs b/BerichtGen/Bericht.cs index dd4a5d7..027ebfd 100644 --- a/BerichtGen/Bericht.cs +++ b/BerichtGen/Bericht.cs @@ -21,11 +21,12 @@ namespace BerichtGen /// /// Erstellt /// - /// Die zuverwendete Vorlagenname - /// Die name zum Speichern der Datei + /// Die zuverwendete Vorlagenname /// Pfad zum Speichern - /// Inhalt vom Dokument - /// Ein doc datei soll erzeugt werden + /// + /// Zur zeit ohne Implementierung + /// Für Tabellen anzeige + /// Ein doc datei soll erzeugt werden /// Ein Pdf datei soll erzeugt werden public void Erzeuge(string source, string savepath,string filename, Hashtable daten,List bilderObjects,DataTable tableContents, bool erzeugeDOC = false , bool erzeugePDF = true) { diff --git a/BerichtGen/FrmOptions.cs b/BerichtGen/FrmOptions.cs index bbca491..865e1c6 100644 --- a/BerichtGen/FrmOptions.cs +++ b/BerichtGen/FrmOptions.cs @@ -26,6 +26,16 @@ namespace BerichtGen List bilderObjects; DataTable tableContent = null; + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// public FrmOptions(string firma, string vorlage, string speicherpfad,string filename, Hashtable grunddaten, List bilderObjects, DataTable tableContent = null) { InitializeComponent(); diff --git a/BerichtGen/FrmPDFViewer.cs b/BerichtGen/FrmPDFViewer.cs index 68ab619..005a4cb 100644 --- a/BerichtGen/FrmPDFViewer.cs +++ b/BerichtGen/FrmPDFViewer.cs @@ -10,9 +10,16 @@ using System.Windows.Forms; namespace BerichtGen { + /// + /// + /// public partial class FrmPDFViewer : Form { string pfad; + /// + /// + /// + /// public FrmPDFViewer(string pfad) { InitializeComponent(); diff --git a/KlassenBIB/AbwasserTechnischeAnlageCollection.cs b/KlassenBIB/AbwasserTechnischeAnlageCollection.cs index be9a563..03620fc 100644 --- a/KlassenBIB/AbwasserTechnischeAnlageCollection.cs +++ b/KlassenBIB/AbwasserTechnischeAnlageCollection.cs @@ -6,6 +6,9 @@ using System.Threading.Tasks; namespace KlassenBIB { + /// + /// + /// public class AbwasserTechnischeAnlageCollection : List { } diff --git a/KlassenBIB/BilderCollection.cs b/KlassenBIB/BilderCollection.cs index 80bc8e2..30cb71f 100644 --- a/KlassenBIB/BilderCollection.cs +++ b/KlassenBIB/BilderCollection.cs @@ -6,6 +6,9 @@ using System.Threading.Tasks; namespace KlassenBIB { + /// + /// + /// public class BilderCollection : List { } diff --git a/KlassenBIB/IImportedObjekte.cs b/KlassenBIB/IImportedObjekte.cs new file mode 100644 index 0000000..61aa398 --- /dev/null +++ b/KlassenBIB/IImportedObjekte.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace KlassenBIB +{ + /// + /// Interface zur Import von Daten + /// + public interface IImportedObjekte + { + /// + /// Angaben zur XMLDatei die importiert werden soll + /// + string XMLFile { get; set; } + /// + /// Angaben zur Projektnummern die eingetragen werden soll in die Objekte + /// + string Projektnummer { get; set; } + /// + /// Funktion der die Inspektionsobjekte übergibt + /// + /// + List GetInspektionsobjekte(); + } +} diff --git a/KlassenBIB/InlinerSanierung.cs b/KlassenBIB/InlinerSanierung.cs index 7c92c0e..83ff7b9 100644 --- a/KlassenBIB/InlinerSanierung.cs +++ b/KlassenBIB/InlinerSanierung.cs @@ -10,6 +10,10 @@ using System.Threading.Tasks; namespace KlassenBIB { + /// + /// Inliner class + /// + /// public sealed class InlinerSanierung : Sanieren, IMakeProtokol { double kalibrierUnterdruck = -0.5; diff --git a/KlassenBIB/Inspektionskuerzeln.cs b/KlassenBIB/Inspektionskuerzeln.cs index 7bfef02..0df037f 100644 --- a/KlassenBIB/Inspektionskuerzeln.cs +++ b/KlassenBIB/Inspektionskuerzeln.cs @@ -6,18 +6,58 @@ using System.Threading.Tasks; namespace KlassenBIB { + /// + /// + /// 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; } } } diff --git a/KlassenBIB/InspektionskuerzelnCollection.cs b/KlassenBIB/InspektionskuerzelnCollection.cs index 83d5d6d..42f0cbb 100644 --- a/KlassenBIB/InspektionskuerzelnCollection.cs +++ b/KlassenBIB/InspektionskuerzelnCollection.cs @@ -7,6 +7,9 @@ using System.Threading.Tasks; namespace KlassenBIB { + /// + /// + /// [Browsable(false)] public class InspektionskuerzelnCollection : List { diff --git a/KlassenBIB/Inspektionsobjekt.cs b/KlassenBIB/Inspektionsobjekt.cs index 7490d69..2c4826a 100644 --- a/KlassenBIB/Inspektionsobjekt.cs +++ b/KlassenBIB/Inspektionsobjekt.cs @@ -7,27 +7,76 @@ using System.Windows.Markup; namespace KlassenBIB { + /// + /// + /// [ContentProperty("Sanierung")] public class Inspektionsobjekt { private string strasseName = "none"; - + /// + /// + /// 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 InspektionskuerzelnCollection Schadenskuerzeln { get; private set; } + /// + /// + /// + public InspektionskuerzelnCollection Schadenskuerzeln { get; set; } + /// + /// + /// public string Bemerkung { get; set; } + /// + /// + /// public SanierungCollection Sanierung { get;set; } - + /// + /// + /// public Inspektionsobjekt() { Schadenskuerzeln = new InspektionskuerzelnCollection(); diff --git a/KlassenBIB/KlassenBIB.csproj b/KlassenBIB/KlassenBIB.csproj index 4e33752..b98c8df 100644 --- a/KlassenBIB/KlassenBIB.csproj +++ b/KlassenBIB/KlassenBIB.csproj @@ -44,6 +44,7 @@ + diff --git a/KlassenBIB/Projekt.cs b/KlassenBIB/Projekt.cs index 215e91f..2e3cf07 100644 --- a/KlassenBIB/Projekt.cs +++ b/KlassenBIB/Projekt.cs @@ -8,13 +8,27 @@ using System.Windows.Markup; [assembly: XmlnsDefinition("http://schemas.cosysda.de/sanVerwaltung/xaml","KlassenBIB")] namespace KlassenBIB { + /// + /// + /// [ContentProperty("Objekte")] public class Projekt { + /// + /// + /// public string Nummer { get; set; } + /// + /// + /// public string Ort { get; set; } + /// + /// + /// public AbwasserTechnischeAnlageCollection Objekte { get; set; } - + /// + /// + /// public Projekt() { Objekte = new AbwasserTechnischeAnlageCollection(); diff --git a/KlassenBIB/Sanierung.cs b/KlassenBIB/Sanierung.cs index 26e7570..f537ee3 100644 --- a/KlassenBIB/Sanierung.cs +++ b/KlassenBIB/Sanierung.cs @@ -28,6 +28,9 @@ namespace KlassenBIB Inspektionsobjekt inspektionsobjekt; protected string pfadZurSan; + /// + /// + /// [Browsable(false)] public Sanierung() { @@ -36,9 +39,16 @@ namespace KlassenBIB } - + /// + /// + /// + /// + /// public abstract string CheckVerzeichnisse(string projektpfad); //public Guid Guid { get => guid; set => guid = value; } + /// + /// + /// public double TempAusen { get => tempAusen; @@ -52,14 +62,41 @@ namespace KlassenBIB } } + /// + /// + /// 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 { @@ -67,7 +104,9 @@ namespace KlassenBIB } } //public DateTime SanierungsDatum { get => sanierungsDatum; set => sanierungsDatum = value; } - + /// + /// + /// public event PropertyChangedEventHandler PropertyChanged; private void NotifyPropertyChanged([CallerMemberName] string propertyName = null) { diff --git a/KlassenBIB/SavedBilder.cs b/KlassenBIB/SavedBilder.cs index cb248ba..cdbefb1 100644 --- a/KlassenBIB/SavedBilder.cs +++ b/KlassenBIB/SavedBilder.cs @@ -6,12 +6,26 @@ using System.Threading.Tasks; namespace KlassenBIB { + /// + /// + /// public class SavedBilder { + /// + /// + /// public string Bildname { get; set; } + /// + /// + /// public string Speicherpfad { get; set; } + /// + /// + /// public string Bemerkung { get; set; } - + /// + /// + /// public override string ToString() { return Bildname; diff --git a/KlassenBIB/SchachtAnbindung.cs b/KlassenBIB/SchachtAnbindung.cs index dcce6c2..c436b40 100644 --- a/KlassenBIB/SchachtAnbindung.cs +++ b/KlassenBIB/SchachtAnbindung.cs @@ -7,23 +7,36 @@ using System.Threading.Tasks; namespace KlassenBIB { + /// + /// + /// public class SchachtAnbindung : Sanieren { string schachtNummer; BilderCollection savedBilders; #region GettersSetters + /// + /// + /// public string SchachtNummer { get => schachtNummer; set => schachtNummer = value; } + /// + /// + /// public BilderCollection SavedBilders { get => savedBilders; set => savedBilders = value; } #endregion - + /// + /// + /// public SchachtAnbindung() { Verzeichnispfad = "Schachtanbindung"; SavedBilders = new BilderCollection(); } - + /// + /// + /// public override string CheckVerzeichnisse(string projektpfad) { string path = Path.Combine(projektpfad, PfadZurSan); diff --git a/KlassenBIBTests/InspektionsobjektTests.cs b/KlassenBIBTests/InspektionsobjektTests.cs index 5253c34..c422250 100644 --- a/KlassenBIBTests/InspektionsobjektTests.cs +++ b/KlassenBIBTests/InspektionsobjektTests.cs @@ -22,6 +22,7 @@ namespace KlassenBIB.Tests [TestMethod()] public void XAMLSerializeTest() { + /* Projekt projekt = new Projekt(); projekt.Nummer = "16/219"; projekt.Ort = "Oldenburg"; @@ -68,6 +69,7 @@ namespace KlassenBIB.Tests XamlServices.Save("projekt1.xaml", projekt); + */ } [TestMethod()] public void InspektionsobjektTest() diff --git a/SanShared/BilderObject.cs b/SanShared/BilderObject.cs index c37a13b..f6ed6ff 100644 --- a/SanShared/BilderObject.cs +++ b/SanShared/BilderObject.cs @@ -6,10 +6,22 @@ using System.Threading.Tasks; namespace SanShared { + /// + /// + /// public class BilderObject { + /// + /// + /// public string Kommentar { get; set; } + /// + /// + /// public string Path { get; set; } + /// + /// + /// public int ImgID { get; set; } } } diff --git a/SanShared/Exceptions/LangNotFoundException.cs b/SanShared/Exceptions/LangNotFoundException.cs index 9580f8c..7911670 100644 --- a/SanShared/Exceptions/LangNotFoundException.cs +++ b/SanShared/Exceptions/LangNotFoundException.cs @@ -7,20 +7,37 @@ using System.Threading.Tasks; namespace SanShared.Exceptions { + /// + /// + /// public class LangNotFoundException : Exception { + /// + /// + /// public LangNotFoundException() { } - + /// + /// + /// + /// public LangNotFoundException(string message) : base(message) { } - + /// + /// + /// + /// + /// public LangNotFoundException(string message, Exception innerException) : base(message, innerException) { } - + /// + /// + /// + /// + /// protected LangNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/SanShared/ILanguage.cs b/SanShared/ILanguage.cs index 19265a4..c6b1140 100644 --- a/SanShared/ILanguage.cs +++ b/SanShared/ILanguage.cs @@ -6,9 +6,18 @@ using System.Threading.Tasks; namespace SanShared { + /// + /// + /// public interface ILanguage { + /// + /// + /// Dictionary Fehlermeldungen { get; } + /// + /// + /// Dictionary Labels { get; } } } diff --git a/SanShared/IMakeProtokol.cs b/SanShared/IMakeProtokol.cs index fb2b1de..f423bdf 100644 --- a/SanShared/IMakeProtokol.cs +++ b/SanShared/IMakeProtokol.cs @@ -7,8 +7,16 @@ using System.Threading.Tasks; namespace SanShared { + /// + /// + /// public interface IMakeProtokol { + /// + /// + /// + /// + /// Hashtable MakeProtokoll(string destinationPath); } } diff --git a/SanShared/ITemperature.cs b/SanShared/ITemperature.cs index d7221f8..b2e0959 100644 --- a/SanShared/ITemperature.cs +++ b/SanShared/ITemperature.cs @@ -6,8 +6,16 @@ using System.Threading.Tasks; namespace SanShared { + /// + /// + /// public interface ITemperature { + /// + /// + /// + /// + /// double GetTemperatur(out string message); } } diff --git a/SanShared/UVcsvStrukture.cs b/SanShared/UVcsvStrukture.cs index a7ff8e5..2a84b05 100644 --- a/SanShared/UVcsvStrukture.cs +++ b/SanShared/UVcsvStrukture.cs @@ -6,14 +6,25 @@ using System.Threading.Tasks; namespace SanShared { + /// + /// CSV Dateistruktur + /// public class UVcsvStrukture { DateTime zeitstempel; double temperatur; double druck; - + /// + /// Zeitstempel vom Eintrag + /// public DateTime Zeitstempel { get => zeitstempel; set => zeitstempel = value; } + /// + /// Temperatur anzeige vom Eintrag + /// public double Temperatur { get => temperatur; set => temperatur = value; } + /// + /// Druckanzeige vom Eintrag + /// public double Druck { get => druck; set => druck = value; } } } diff --git a/SanSystem/SanSystem.csproj b/SanSystem/SanSystem.csproj index c90facd..e3fd296 100644 --- a/SanSystem/SanSystem.csproj +++ b/SanSystem/SanSystem.csproj @@ -249,6 +249,10 @@ {c949087e-20e1-4a17-b021-faead363c1d8} SanShared + + {E1564A4D-39FD-489B-8029-AEEF33033EF2} + SchnittstelleImporter + {e4979419-5eae-4b6d-a6a0-9632c1de87a0} TempCAN diff --git a/SanSystem/frmMain.Designer.cs b/SanSystem/frmMain.Designer.cs index 39eedb7..48c9a65 100644 --- a/SanSystem/frmMain.Designer.cs +++ b/SanSystem/frmMain.Designer.cs @@ -33,9 +33,10 @@ this.neuToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.öffnenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.speichernToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.massenstatistikToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.toolStripStatus_projekt_Label = new System.Windows.Forms.ToolStripStatusLabel(); - this.massenstatistikToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.stammdatenImportierenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.mainmenu.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.SuspendLayout(); @@ -57,7 +58,8 @@ // this.projektToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.neuToolStripMenuItem, - this.öffnenToolStripMenuItem}); + this.öffnenToolStripMenuItem, + this.stammdatenImportierenToolStripMenuItem}); this.projektToolStripMenuItem.Name = "projektToolStripMenuItem"; this.projektToolStripMenuItem.Size = new System.Drawing.Size(56, 20); this.projektToolStripMenuItem.Text = "Projekt"; @@ -65,14 +67,14 @@ // neuToolStripMenuItem // this.neuToolStripMenuItem.Name = "neuToolStripMenuItem"; - this.neuToolStripMenuItem.Size = new System.Drawing.Size(111, 22); + this.neuToolStripMenuItem.Size = new System.Drawing.Size(207, 22); this.neuToolStripMenuItem.Text = "Neu"; this.neuToolStripMenuItem.Click += new System.EventHandler(this.neuToolStripMenuItem_Click); // // öffnenToolStripMenuItem // this.öffnenToolStripMenuItem.Name = "öffnenToolStripMenuItem"; - this.öffnenToolStripMenuItem.Size = new System.Drawing.Size(111, 22); + this.öffnenToolStripMenuItem.Size = new System.Drawing.Size(207, 22); this.öffnenToolStripMenuItem.Text = "Öffnen"; this.öffnenToolStripMenuItem.Click += new System.EventHandler(this.öffnenToolStripMenuItem_Click); // @@ -83,6 +85,13 @@ this.speichernToolStripMenuItem.Text = "Speichern"; this.speichernToolStripMenuItem.Click += new System.EventHandler(this.speichernToolStripMenuItem_Click); // + // massenstatistikToolStripMenuItem + // + this.massenstatistikToolStripMenuItem.Name = "massenstatistikToolStripMenuItem"; + this.massenstatistikToolStripMenuItem.Size = new System.Drawing.Size(99, 20); + this.massenstatistikToolStripMenuItem.Text = "Massenstatistik"; + this.massenstatistikToolStripMenuItem.Click += new System.EventHandler(this.massenstatistikToolStripMenuItem_Click); + // // statusStrip1 // this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); @@ -100,12 +109,12 @@ this.toolStripStatus_projekt_Label.Size = new System.Drawing.Size(44, 17); this.toolStripStatus_projekt_Label.Text = "Projekt"; // - // massenstatistikToolStripMenuItem + // stammdatenImportierenToolStripMenuItem // - this.massenstatistikToolStripMenuItem.Name = "massenstatistikToolStripMenuItem"; - this.massenstatistikToolStripMenuItem.Size = new System.Drawing.Size(99, 20); - this.massenstatistikToolStripMenuItem.Text = "Massenstatistik"; - this.massenstatistikToolStripMenuItem.Click += new System.EventHandler(this.massenstatistikToolStripMenuItem_Click); + this.stammdatenImportierenToolStripMenuItem.Name = "stammdatenImportierenToolStripMenuItem"; + this.stammdatenImportierenToolStripMenuItem.Size = new System.Drawing.Size(207, 22); + this.stammdatenImportierenToolStripMenuItem.Text = "Stammdaten importieren"; + this.stammdatenImportierenToolStripMenuItem.Click += new System.EventHandler(this.stammdatenImportierenToolStripMenuItem_Click); // // frmMain // @@ -116,7 +125,7 @@ this.Controls.Add(this.mainmenu); this.IsMdiContainer = true; this.MainMenuStrip = this.mainmenu; - this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.Margin = new System.Windows.Forms.Padding(2); this.Name = "frmMain"; this.Text = "Kanalsanierungsverwaltung"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frm_main_FormClosing); @@ -140,6 +149,7 @@ private System.Windows.Forms.ToolStripStatusLabel toolStripStatus_projekt_Label; private System.Windows.Forms.ToolStripMenuItem speichernToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem massenstatistikToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem stammdatenImportierenToolStripMenuItem; } } diff --git a/SanSystem/frmMain.cs b/SanSystem/frmMain.cs index 001b347..f17b778 100644 --- a/SanSystem/frmMain.cs +++ b/SanSystem/frmMain.cs @@ -1,6 +1,7 @@ using Database; using FluentFTP; using KlassenBIB; +using SchnittstelleImporter; using System; using System.Collections.Generic; using System.ComponentModel; @@ -108,5 +109,13 @@ namespace SanSystem FrmSelectMassenDate frmSelectMassenDate = new FrmSelectMassenDate(); frmSelectMassenDate.ShowDialog(); } + + private void stammdatenImportierenToolStripMenuItem_Click(object sender, EventArgs e) + { + IImportedObjekte importedObjekte = new Import(); + importedObjekte.XMLFile = @"C:\Users\Damian\Desktop\XML\3_Zustandsdaten\ISYBAU_XML-2006-Zustandsdaten_DIN_EN_13508-2.xml"; + importedObjekte.Projektnummer = Global.Instance.ProjektNummer; + Datenbank.Instance.loadedProjekt.Objekte.AddRange(importedObjekte.GetInspektionsobjekte()); + } } } diff --git a/SanSystem_exe.WibuAxProject b/SanSystem_exe.WibuAxProject index 35cd606..0039393 100644 Binary files a/SanSystem_exe.WibuAxProject and b/SanSystem_exe.WibuAxProject differ diff --git a/SanVerwaltung.sln b/SanVerwaltung.sln index 045699c..5cfbb31 100644 --- a/SanVerwaltung.sln +++ b/SanVerwaltung.sln @@ -25,6 +25,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Language", "Language\Langua EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BerichtGen", "BerichtGen\BerichtGen.csproj", "{3022DA07-FD06-4AEA-9FC8-00D318E95A82}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SchnittstelleImporterTests", "SchnittstelleImporterTests\SchnittstelleImporterTests.csproj", "{9264791A-9D57-4133-BE47-75721057DBBB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -71,6 +73,10 @@ Global {3022DA07-FD06-4AEA-9FC8-00D318E95A82}.Debug|Any CPU.Build.0 = Debug|Any CPU {3022DA07-FD06-4AEA-9FC8-00D318E95A82}.Release|Any CPU.ActiveCfg = Release|Any CPU {3022DA07-FD06-4AEA-9FC8-00D318E95A82}.Release|Any CPU.Build.0 = Release|Any CPU + {9264791A-9D57-4133-BE47-75721057DBBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9264791A-9D57-4133-BE47-75721057DBBB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9264791A-9D57-4133-BE47-75721057DBBB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9264791A-9D57-4133-BE47-75721057DBBB}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/SchnittstelleImporter/Import.cs b/SchnittstelleImporter/Import.cs new file mode 100644 index 0000000..dd081d3 --- /dev/null +++ b/SchnittstelleImporter/Import.cs @@ -0,0 +1,97 @@ +using KlassenBIB; +using SchnittstelleImporter.XML2006; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchnittstelleImporter +{ + /// + /// + /// + public class Import : IImportedObjekte + { + string xmlFile; + string projektnummer; + /// + /// Angabe zur XML datei + /// + public string XMLFile + { + get + { + return xmlFile; + } + set + { + xmlFile = value; + } + } + /// + /// Angabe zur Projektnummer + /// + public string Projektnummer + { + get + { + return projektnummer; + } + set + { + projektnummer = value; + } + + } + + /// + /// + /// + /// + public List GetInspektionsobjekte() + { + List result = new List(); + List anlagen = XMLParser.GetList(XMLFile); + foreach(InspizierteAbwassertechnischeAnlage src in anlagen) + { + Inspektionsobjekt inspektionsobjekt = new Inspektionsobjekt(); + InspektionskuerzelnCollection inspektionskuerzelns = new InspektionskuerzelnCollection(); + + 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 ? 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.Bemerkung = 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; + + 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; + } + } +} diff --git a/SchnittstelleImporter/SchnittstelleImporter.csproj b/SchnittstelleImporter/SchnittstelleImporter.csproj index 3482fcd..5c2237a 100644 --- a/SchnittstelleImporter/SchnittstelleImporter.csproj +++ b/SchnittstelleImporter/SchnittstelleImporter.csproj @@ -41,17 +41,23 @@ + - + + + + + {c82bd650-466b-403f-bed9-2b1660771f54} + KlassenBIB + - \ No newline at end of file diff --git a/SchnittstelleImporter/XML2006/Anschlussdaten.cs b/SchnittstelleImporter/XML2006/Anschlussdaten.cs index 63974c4..187e5cd 100644 --- a/SchnittstelleImporter/XML2006/Anschlussdaten.cs +++ b/SchnittstelleImporter/XML2006/Anschlussdaten.cs @@ -14,12 +14,29 @@ namespace SchnittstelleImporter.XML2006 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; } } } diff --git a/SchnittstelleImporter/XML2006/Enums.cs b/SchnittstelleImporter/XML2006/Enums.cs index e3582ea..db80bce 100644 --- a/SchnittstelleImporter/XML2006/Enums.cs +++ b/SchnittstelleImporter/XML2006/Enums.cs @@ -6,6 +6,9 @@ using System.Threading.Tasks; namespace SchnittstelleImporter.XML2006 { + /// + /// + /// public enum EAnlagetyp { Haltung = 1, @@ -13,35 +16,53 @@ namespace SchnittstelleImporter.XML2006 Schacht = 3, Bauwerk = 4 } - public enum EInspektionverfahren + /// + /// + /// + enum EInspektionverfahren { TVUntersuchung, Begehung, VomSchacht, Other } - public enum EWetter + /// + /// + /// + enum EWetter { KEINNIEDERSCHLAG = 1, REGEN = 2, SCHNEE = 3 } + /// + /// + /// public enum ERohrleitungstyp { HALTUNG, LEITUNG } - public enum EObjektArt + /// + /// + /// + enum EObjektArt { KANTE = 1, KNOTEN = 2 } + /// + /// + /// public enum EKnotenTyp { SCHACHT = 0, ANSCHLUSSPUNKT = 1, BAUWERK = 2 } + /// + /// + /// public enum EKantenTyp { HALTUNG, diff --git a/SchnittstelleImporter/XML2006/InspizierteAbwassertechnischeAnlage.cs b/SchnittstelleImporter/XML2006/InspizierteAbwassertechnischeAnlage.cs index 648bc29..955c65d 100644 --- a/SchnittstelleImporter/XML2006/InspizierteAbwassertechnischeAnlage.cs +++ b/SchnittstelleImporter/XML2006/InspizierteAbwassertechnischeAnlage.cs @@ -12,7 +12,9 @@ namespace SchnittstelleImporter.XML2006 Lage lage; EAnlagetyp anlagentyp; OptischeInspektion optischeInspektion; - + /// + /// + /// public string Objektbezeichnung { get @@ -24,6 +26,9 @@ namespace SchnittstelleImporter.XML2006 objektbezeichnung = value; } } + /// + /// + /// public EAnlagetyp Anlagentyp { get @@ -35,6 +40,9 @@ namespace SchnittstelleImporter.XML2006 anlagentyp = value; } } + /// + /// + /// public OptischeInspektion OptischeInspektion { get @@ -46,6 +54,9 @@ namespace SchnittstelleImporter.XML2006 optischeInspektion = value; } } + /// + /// + /// public Lage Lage { get @@ -57,6 +68,10 @@ namespace SchnittstelleImporter.XML2006 lage = value; } } + /// + /// + /// + public override string ToString() { return objektbezeichnung; diff --git a/SchnittstelleImporter/XML2006/Lage.cs b/SchnittstelleImporter/XML2006/Lage.cs index 1b9249d..2c45b1f 100644 --- a/SchnittstelleImporter/XML2006/Lage.cs +++ b/SchnittstelleImporter/XML2006/Lage.cs @@ -10,7 +10,9 @@ namespace SchnittstelleImporter.XML2006 { string strassename; string ortname; - + /// + /// + /// public string Strassename { get @@ -22,6 +24,9 @@ namespace SchnittstelleImporter.XML2006 strassename = value; } } + /// + /// + /// public string Ortname { get @@ -33,6 +38,11 @@ namespace SchnittstelleImporter.XML2006 ortname = value; } } + /// + /// + /// + /// + /// public Lage(string strassename, string ortname) { this.strassename = strassename; diff --git a/SchnittstelleImporter/XML2006/OptischeInspektion.cs b/SchnittstelleImporter/XML2006/OptischeInspektion.cs index bdeb1f1..1d77bfa 100644 --- a/SchnittstelleImporter/XML2006/OptischeInspektion.cs +++ b/SchnittstelleImporter/XML2006/OptischeInspektion.cs @@ -10,7 +10,9 @@ namespace SchnittstelleImporter.XML2006 { DateTime inspektionstime; Rohrleitung rohrleitung; - + /// + /// + /// public DateTime Inspektionstime { set @@ -22,6 +24,9 @@ namespace SchnittstelleImporter.XML2006 return inspektionstime; } } + /// + /// + /// public string Inspektionsdatum { get @@ -34,6 +39,9 @@ namespace SchnittstelleImporter.XML2006 //inspektionsdatum = value; }*/ } + /// + /// + /// public string Inspektionszeit { get @@ -41,6 +49,9 @@ namespace SchnittstelleImporter.XML2006 return inspektionstime.ToShortTimeString(); } } + /// + /// + /// public Rohrleitung Rohrleitung { get diff --git a/SchnittstelleImporter/XML2006/RGrunddaten.cs b/SchnittstelleImporter/XML2006/RGrunddaten.cs index 90f0fa9..5b65480 100644 --- a/SchnittstelleImporter/XML2006/RGrunddaten.cs +++ b/SchnittstelleImporter/XML2006/RGrunddaten.cs @@ -23,22 +23,65 @@ namespace SchnittstelleImporter.XML2006 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 @@ -46,7 +89,9 @@ namespace SchnittstelleImporter.XML2006 return anschlussddaten != null; } } - + /// + /// + /// public string Innenschutz { get => innenschutz; set => innenschutz = value; } } } diff --git a/SchnittstelleImporter/XML2006/Rohrleitung.cs b/SchnittstelleImporter/XML2006/Rohrleitung.cs index f87af0a..4ce2f2d 100644 --- a/SchnittstelleImporter/XML2006/Rohrleitung.cs +++ b/SchnittstelleImporter/XML2006/Rohrleitung.cs @@ -6,6 +6,9 @@ using System.Threading.Tasks; namespace SchnittstelleImporter.XML2006 { + /// + /// + /// public class Rohrleitung { ERohrleitungstyp rohrleitungstyp; @@ -13,7 +16,9 @@ namespace SchnittstelleImporter.XML2006 string inspektionsrichtung; RGrunddaten grunddaten = null; List zustaende = null; - + /// + /// + /// public ERohrleitungstyp Rohrleitungstyp { get @@ -25,7 +30,9 @@ namespace SchnittstelleImporter.XML2006 rohrleitungstyp = value; } } - + /// + /// + /// public decimal Inspektionslaenge { get @@ -37,6 +44,9 @@ namespace SchnittstelleImporter.XML2006 inspektionslaenge = value; } } + /// + /// + /// public string Inspektionsrichtung { get @@ -54,6 +64,9 @@ namespace SchnittstelleImporter.XML2006 inspektionsrichtung = value; } } + /// + /// + /// public List Zustaende { get @@ -65,6 +78,9 @@ namespace SchnittstelleImporter.XML2006 zustaende = value; } } + /// + /// + /// public RGrunddaten Grunddaten { get diff --git a/SchnittstelleImporter/XML2006/Functions.cs b/SchnittstelleImporter/XML2006/XMLParser.cs similarity index 96% rename from SchnittstelleImporter/XML2006/Functions.cs rename to SchnittstelleImporter/XML2006/XMLParser.cs index 020868e..1fcb92f 100644 --- a/SchnittstelleImporter/XML2006/Functions.cs +++ b/SchnittstelleImporter/XML2006/XMLParser.cs @@ -8,9 +8,17 @@ using System.Xml; namespace SchnittstelleImporter.XML2006 { + /// + /// + /// public static class XMLParser { public static Dictionary anlageInFile = new Dictionary(); + /// + /// Gibt eine Liste an anlagen zurück von einer XML Datei. + /// + /// + /// public static List GetList(string xmldatei) { List result = new List(); @@ -28,6 +36,7 @@ namespace SchnittstelleImporter.XML2006 foreach (XmlNode node in inspizierteDaten) { InspizierteAbwassertechnischeAnlage anlage = GetAnlage(node); + if (anlage == null) continue; result.Add(anlage); anlageInFile.Add(anlage, xmldatei); } @@ -112,7 +121,8 @@ namespace SchnittstelleImporter.XML2006 optischeInspektion.Inspektionstime = dt; if (intRohrleitung == null) - throw new NotImplementedException("Schaechte sind noch nicht implementiert"); + return null; + //throw new NotImplementedException("Schaechte sind noch nicht implementiert"); Rohrleitung rohr = new Rohrleitung(); foreach (XmlNode d in intRohrleitung) @@ -256,6 +266,8 @@ namespace SchnittstelleImporter.XML2006 case "Fotodatei": break; case "FotoSpeichermedium": break; case "Fotonummer": break; + case "Timecode": break; + case "GrundAbbruch": break; default: throw new NotImplementedException(d.Name); } diff --git a/SchnittstelleImporterTests/ImportTests.cs b/SchnittstelleImporterTests/ImportTests.cs new file mode 100644 index 0000000..04b733d --- /dev/null +++ b/SchnittstelleImporterTests/ImportTests.cs @@ -0,0 +1,24 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using SchnittstelleImporter; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchnittstelleImporter.Tests +{ + [TestClass()] + public class ImportTests + { + [TestMethod()] + public void GetInspektionsobjekteTest() + { + Import import = new Import(); + import.XMLFile = @"C:\Users\Damian\Desktop\XML\3_Zustandsdaten\ISYBAU_XML-2006-Zustandsdaten_DIN_EN_13508-2.xml"; + import.GetInspektionsobjekte(); + + Assert.Fail(); + } + } +} \ No newline at end of file diff --git a/SchnittstelleImporterTests/Properties/AssemblyInfo.cs b/SchnittstelleImporterTests/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a5a2c33 --- /dev/null +++ b/SchnittstelleImporterTests/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über folgende +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die einer Assembly zugeordnet sind. +[assembly: AssemblyTitle("SchnittstelleImporterTests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SchnittstelleImporterTests")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Wenn ComVisible auf "false" festgelegt wird, sind die Typen innerhalb 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("9264791a-9d57-4133-be47-75721057dbbb")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern +// übernehmen, indem Sie "*" eingeben: +// [Assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SchnittstelleImporterTests/SchnittstelleImporterTests.csproj b/SchnittstelleImporterTests/SchnittstelleImporterTests.csproj new file mode 100644 index 0000000..d71cf52 --- /dev/null +++ b/SchnittstelleImporterTests/SchnittstelleImporterTests.csproj @@ -0,0 +1,111 @@ + + + + + Debug + AnyCPU + {9264791A-9D57-4133-BE47-75721057DBBB} + Library + Properties + SchnittstelleImporterTests + SchnittstelleImporterTests + v4.6.1 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + UnitTest + + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\MSTest.TestFramework.1.2.1\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + + + ..\packages\MSTest.TestFramework.1.2.1\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + + + + + + + + + + + + + + + + + + + + + + {C82BD650-466B-403F-BED9-2B1660771F54} + KlassenBIB + + + {E1564A4D-39FD-489B-8029-AEEF33033EF2} + SchnittstelleImporter + + + + + + + False + + + False + + + False + + + False + + + + + + + + + Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}". + + + + + + + \ No newline at end of file diff --git a/SchnittstelleImporterTests/XML2006/XMLParserTests.cs b/SchnittstelleImporterTests/XML2006/XMLParserTests.cs new file mode 100644 index 0000000..aaf8e8b --- /dev/null +++ b/SchnittstelleImporterTests/XML2006/XMLParserTests.cs @@ -0,0 +1,22 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using SchnittstelleImporter.XML2006; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchnittstelleImporter.XML2006.Tests +{ + [TestClass()] + public class XMLParserTests + { + [TestMethod()] + public void GetListTest() + { + string xmlfile = @"C:\Users\Damian\Desktop\XML\3_Zustandsdaten\ISYBAU_XML-2006-Zustandsdaten_DIN_EN_13508-2.xml"; + var x = XMLParser.GetList(xmlfile); + Assert.Fail(); + } + } +} \ No newline at end of file diff --git a/SchnittstelleImporterTests/packages.config b/SchnittstelleImporterTests/packages.config new file mode 100644 index 0000000..0908943 --- /dev/null +++ b/SchnittstelleImporterTests/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file