Bluelight CSV wird nun gelesen
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
|
||||
@@ -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<UVcsvStrukture> struktures = null;
|
||||
csvFile = CsvParserFactory.ReadCSVFile(AcceptedCSVFormats.UVRELINING, files.Last());
|
||||
csvFile = CsvParserFactory.ReadCSVFile(AcceptedCSVFormats.BLUELIGHT, files.Last());
|
||||
try
|
||||
{
|
||||
struktures = csvFile.ReadCSVStrukture();
|
||||
|
||||
Reference in New Issue
Block a user