Man kann jetzt einen Offset eingeben

This commit is contained in:
HuskyTeufel
2020-03-25 13:00:28 +01:00
parent bb59ec3665
commit a9320eb1f6
11 changed files with 305 additions and 21 deletions

View File

@@ -56,8 +56,8 @@ namespace KlassenBIB
return path;
}
public Hashtable MakeProtokoll(string destinationPath, IProjekt projekt)
public Hashtable MakeProtokoll(string destinationPath, IProjekt projekt, DateTime offset)
{
IEnumerable<string> files = Directory.EnumerateFiles(destinationPath, "*.csv", SearchOption.AllDirectories);
@@ -82,6 +82,12 @@ namespace KlassenBIB
this.AnfangAushaertung = struktures.Select(x => x.Zeitstempel).Min();
this.EndeAushaertung = struktures.Select(x => x.Zeitstempel).Max();
if (!(offset == DateTime.MinValue))
{
TimeSpan duration = EndeAushaertung.Subtract(AnfangAushaertung);
AnfangAushaertung = offset;
EndeAushaertung = AnfangAushaertung.Add(duration);
}
this.Rueckholgeschwindigkeit = 0;
}
catch (FileNotFoundException ex)