diff --git a/BerichtGen/makeGraphic.cs b/BerichtGen/makeGraphic.cs index 3f11951..101c709 100644 --- a/BerichtGen/makeGraphic.cs +++ b/BerichtGen/makeGraphic.cs @@ -47,6 +47,8 @@ namespace BerichtGen mychart.Points.Add(counter, pars.Temperatur); else if (type.Equals("Druck")) mychart.Points.Add(counter, pars.Druck); + else if (type.Equals("Speed")) + mychart.Points.Add(counter, pars.Geschwindigkeit); else throw new Exception("Kein gültiger Aufruf"); counter++; @@ -63,6 +65,10 @@ namespace BerichtGen case "Druck": axis.Title = "[bar]"; break; + + case "Speed": + axis.Title = "[cm]"; + break; } axis.TitleFont = new Font("Segeo UI", 14F); @@ -95,10 +101,16 @@ namespace BerichtGen 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, "Speed"); + if (speedChart == null) return false; + else + speedChart.SaveImage(Path.Combine(destinationPath, "linerGraph_speed.jpg")); return true; } } diff --git a/CSVParser/BlueLight.cs b/CSVParser/BlueLight.cs index 5df45a6..9a56b01 100644 --- a/CSVParser/BlueLight.cs +++ b/CSVParser/BlueLight.cs @@ -27,16 +27,21 @@ namespace CSVParser { UVcsvStrukture strukture = new UVcsvStrukture(); string[] parts = partial.Split(','); - string datum = parts[1]; - string uhrzeit = parts[2]; + + string datum = parts[1].Replace("\"", ""); + string uhrzeit = parts[2].Replace("\"", ""); + + if (datum.Equals("Date")) continue; if (!DateTime.TryParse(datum + " " + uhrzeit, out zeit)) throw new Exception("Konnte die datum uhrzeit nicht konventieren"); - double.TryParse(parts[3].Replace('.', ','), out temperatur); - int.TryParse(parts[4], out geschwindigkeit); - double.TryParse(parts[5].Replace('.', ','), out druck); + double.TryParse(parts[3].Replace("\"","").Replace('.', ','), out temperatur); + int.TryParse(parts[4].Replace("\"",""), out geschwindigkeit); + double.TryParse(parts[5].Replace("\"","").Replace('.', ','), out druck); + + if (geschwindigkeit > 100) geschwindigkeit = 0; strukture.Zeitstempel = zeit; strukture.Druck = druck; diff --git a/KlassenBIB/InlinerSanierung.cs b/KlassenBIB/InlinerSanierung.cs index c6b0918..6af396a 100644 --- a/KlassenBIB/InlinerSanierung.cs +++ b/KlassenBIB/InlinerSanierung.cs @@ -52,10 +52,10 @@ namespace KlassenBIB 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); + //string mypath = Path.Combine(path, Verzeichnispfad); + //if (!Directory.Exists(mypath)) Directory.CreateDirectory(mypath); - return mypath; + return path; } /// /// diff --git a/SanSystem/UCInliner.cs b/SanSystem/UCInliner.cs index cc7363b..3215881 100644 --- a/SanSystem/UCInliner.cs +++ b/SanSystem/UCInliner.cs @@ -218,7 +218,7 @@ namespace SanSystem private bool AccessCSV() { - string myPath = Path.Combine(destinationPath, "Trend"); + string myPath = Path.Combine(destinationPath); if (!Directory.Exists(myPath)) return false; @@ -227,7 +227,7 @@ namespace SanSystem IReadCSVData csvFile = null; List struktures = null; - csvFile = CsvParserFactory.ReadCSVFile(AcceptedCSVFormats.UVRELINING, files.Last()); + csvFile = CsvParserFactory.ReadCSVFile(AcceptedCSVFormats.BLUELIGHT, files.Last()); try { struktures = csvFile.ReadCSVStrukture();