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

@@ -12,12 +12,17 @@ namespace KlassenBIB
DateTime datum = new DateTime();
bool fertig = false;
string verzeichnispfad;
/// <summary>
/// Dient zum Überschreiben
/// </summary>
DateTime offset;
#region getSeters
public string Besatzung { get; set; }
public DateTime Datum { get => datum; set => datum = value; }
public bool Fertig { get => fertig; set => fertig = value; }
public string Verzeichnispfad { get => verzeichnispfad; protected set => verzeichnispfad = value; }
public DateTime Offset { get => offset; set => offset = value; }
#endregion
}
}

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)