Kleine änderungen durchgeführt
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -21,6 +22,7 @@ namespace CSVParser
|
|||||||
double druck;
|
double druck;
|
||||||
int geschwindigkeit;
|
int geschwindigkeit;
|
||||||
|
|
||||||
|
|
||||||
foreach (string partial in Input)
|
foreach (string partial in Input)
|
||||||
{
|
{
|
||||||
UVcsvStrukture strukture = new UVcsvStrukture();
|
UVcsvStrukture strukture = new UVcsvStrukture();
|
||||||
@@ -29,7 +31,7 @@ namespace CSVParser
|
|||||||
string uhrzeit = parts[2];
|
string uhrzeit = parts[2];
|
||||||
|
|
||||||
|
|
||||||
if(!DateTime.TryParse(datum + " "+uhrzeit,out zeit))
|
if (!DateTime.TryParse(datum + " " + uhrzeit, out zeit))
|
||||||
throw new Exception("Konnte die datum uhrzeit nicht konventieren");
|
throw new Exception("Konnte die datum uhrzeit nicht konventieren");
|
||||||
|
|
||||||
double.TryParse(parts[3].Replace('.', ','), out temperatur);
|
double.TryParse(parts[3].Replace('.', ','), out temperatur);
|
||||||
@@ -44,6 +46,7 @@ namespace CSVParser
|
|||||||
result.Add(strukture);
|
result.Add(strukture);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace CSVParser
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (!File.Exists(csvFile)) return null;
|
if (!File.Exists(csvFile)) throw new FileNotFoundException(csvFile);
|
||||||
return File.ReadAllLines(csvFile);
|
return File.ReadAllLines(csvFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -226,12 +226,21 @@ namespace SanSystem
|
|||||||
|
|
||||||
|
|
||||||
IReadCSVData csvFile = null;
|
IReadCSVData csvFile = null;
|
||||||
|
List<UVcsvStrukture> struktures = null;
|
||||||
csvFile = CsvParserFactory.ReadCSVFile(AcceptedCSVFormats.UVRELINING, files.Last());
|
csvFile = CsvParserFactory.ReadCSVFile(AcceptedCSVFormats.UVRELINING, files.Last());
|
||||||
List<UVcsvStrukture> struktures = csvFile.ReadCSVStrukture();
|
try
|
||||||
|
{
|
||||||
|
struktures = csvFile.ReadCSVStrukture();
|
||||||
|
|
||||||
inliner.AnfangAushaertung = struktures.Select(x => x.Zeitstempel).Min();
|
inliner.AnfangAushaertung = struktures.Select(x => x.Zeitstempel).Min();
|
||||||
inliner.EndeAushaertung = struktures.Select(x => x.Zeitstempel).Max();
|
inliner.EndeAushaertung = struktures.Select(x => x.Zeitstempel).Max();
|
||||||
|
}
|
||||||
|
catch(FileNotFoundException ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(string.Format("Datei {0} wurde nicht gefunden", ex.FileName));
|
||||||
|
}
|
||||||
|
if (struktures == null)
|
||||||
|
return false;
|
||||||
return makeGraphic.GetGraphics(struktures, destinationPath);
|
return makeGraphic.GetGraphics(struktures, destinationPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user