From 2f4d23d878a2318704df811f4dc310e9cb545253 Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Wed, 6 Apr 2022 16:59:11 +0200 Subject: [PATCH] add date time of the mission to the overview This helps with pre- and post-tick evaluations. --- BGS/InfluenceSupport.cs | 6 ++++++ BGS/LogEntry.cs | 15 +++++++++++++++ MainWindow.xaml | 3 ++- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/BGS/InfluenceSupport.cs b/BGS/InfluenceSupport.cs index 4804692..77b06fd 100644 --- a/BGS/InfluenceSupport.cs +++ b/BGS/InfluenceSupport.cs @@ -11,6 +11,12 @@ namespace EliteBGS.BGS { public string Influence { get; set; } public MissionCompletedEntry RelevantMission { get; set; } + public override string CompletedAt { + get { + return RelevantMission.Timestamp.ToString("dd.MM.yyyy hh:mm UTC"); + } + } + public override string ToString() { StringBuilder builder = new StringBuilder(); string missionname; diff --git a/BGS/LogEntry.cs b/BGS/LogEntry.cs index 197779c..eb868e0 100644 --- a/BGS/LogEntry.cs +++ b/BGS/LogEntry.cs @@ -11,6 +11,21 @@ namespace EliteBGS.BGS { public bool IsEnabled { get; set; } = true; + public virtual string CompletedAt { + get { + var items = Entries + .OrderBy(x => x.Timestamp) + .ToArray() + ; + if (items == null || items.Length == 0) { + return "Unknown"; + } + + Entry last = items.Last(); + return last.Timestamp.ToString("dd.MM.yyyy hh:mm UTC"); + } + } + /// /// Controlling faction of the station this entry was made/turned into. /// diff --git a/MainWindow.xaml b/MainWindow.xaml index 2081a1e..fedaf87 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -63,7 +63,8 @@ - + +