Bluelight CSV wird nun gelesen
This commit is contained in:
@@ -47,6 +47,8 @@ namespace BerichtGen
|
|||||||
mychart.Points.Add(counter, pars.Temperatur);
|
mychart.Points.Add(counter, pars.Temperatur);
|
||||||
else if (type.Equals("Druck"))
|
else if (type.Equals("Druck"))
|
||||||
mychart.Points.Add(counter, pars.Druck);
|
mychart.Points.Add(counter, pars.Druck);
|
||||||
|
else if (type.Equals("Speed"))
|
||||||
|
mychart.Points.Add(counter, pars.Geschwindigkeit);
|
||||||
else
|
else
|
||||||
throw new Exception("Kein gültiger Aufruf");
|
throw new Exception("Kein gültiger Aufruf");
|
||||||
counter++;
|
counter++;
|
||||||
@@ -63,6 +65,10 @@ namespace BerichtGen
|
|||||||
case "Druck":
|
case "Druck":
|
||||||
axis.Title = "[bar]";
|
axis.Title = "[bar]";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "Speed":
|
||||||
|
axis.Title = "[cm]";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
axis.TitleFont = new Font("Segeo UI", 14F);
|
axis.TitleFont = new Font("Segeo UI", 14F);
|
||||||
@@ -95,10 +101,16 @@ namespace BerichtGen
|
|||||||
if (tempChart == null) return false;
|
if (tempChart == null) return false;
|
||||||
else
|
else
|
||||||
tempChart.SaveImage(Path.Combine(destinationPath, "linerGraph_temp.jpg"));
|
tempChart.SaveImage(Path.Combine(destinationPath, "linerGraph_temp.jpg"));
|
||||||
|
|
||||||
ChartControl druckChart = getGraph(struktures, "Druck");
|
ChartControl druckChart = getGraph(struktures, "Druck");
|
||||||
if (druckChart == null) return false;
|
if (druckChart == null) return false;
|
||||||
else
|
else
|
||||||
druckChart.SaveImage(Path.Combine(destinationPath, "linerGraph_druck.jpg"));
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,16 +27,21 @@ namespace CSVParser
|
|||||||
{
|
{
|
||||||
UVcsvStrukture strukture = new UVcsvStrukture();
|
UVcsvStrukture strukture = new UVcsvStrukture();
|
||||||
string[] parts = partial.Split(',');
|
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))
|
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("\"","").Replace('.', ','), out temperatur);
|
||||||
int.TryParse(parts[4], out geschwindigkeit);
|
int.TryParse(parts[4].Replace("\"",""), out geschwindigkeit);
|
||||||
double.TryParse(parts[5].Replace('.', ','), out druck);
|
double.TryParse(parts[5].Replace("\"","").Replace('.', ','), out druck);
|
||||||
|
|
||||||
|
if (geschwindigkeit > 100) geschwindigkeit = 0;
|
||||||
|
|
||||||
strukture.Zeitstempel = zeit;
|
strukture.Zeitstempel = zeit;
|
||||||
strukture.Druck = druck;
|
strukture.Druck = druck;
|
||||||
|
|||||||
@@ -52,10 +52,10 @@ namespace KlassenBIB
|
|||||||
string path = Path.Combine(projektpfad, PfadZurSan);
|
string path = Path.Combine(projektpfad, PfadZurSan);
|
||||||
if (!Directory.Exists(path)) Directory.CreateDirectory(path);
|
if (!Directory.Exists(path)) Directory.CreateDirectory(path);
|
||||||
|
|
||||||
string mypath = Path.Combine(path, Verzeichnispfad);
|
//string mypath = Path.Combine(path, Verzeichnispfad);
|
||||||
if (!Directory.Exists(mypath)) Directory.CreateDirectory(mypath);
|
//if (!Directory.Exists(mypath)) Directory.CreateDirectory(mypath);
|
||||||
|
|
||||||
return mypath;
|
return path;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ namespace SanSystem
|
|||||||
|
|
||||||
private bool AccessCSV()
|
private bool AccessCSV()
|
||||||
{
|
{
|
||||||
string myPath = Path.Combine(destinationPath, "Trend");
|
string myPath = Path.Combine(destinationPath);
|
||||||
if (!Directory.Exists(myPath))
|
if (!Directory.Exists(myPath))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -227,7 +227,7 @@ namespace SanSystem
|
|||||||
|
|
||||||
IReadCSVData csvFile = null;
|
IReadCSVData csvFile = null;
|
||||||
List<UVcsvStrukture> struktures = null;
|
List<UVcsvStrukture> struktures = null;
|
||||||
csvFile = CsvParserFactory.ReadCSVFile(AcceptedCSVFormats.UVRELINING, files.Last());
|
csvFile = CsvParserFactory.ReadCSVFile(AcceptedCSVFormats.BLUELIGHT, files.Last());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
struktures = csvFile.ReadCSVStrukture();
|
struktures = csvFile.ReadCSVStrukture();
|
||||||
|
|||||||
Reference in New Issue
Block a user