add date time of the mission to the overview

This helps with pre- and post-tick evaluations.
This commit is contained in:
Florian Stinglmayr 2022-04-06 16:59:11 +02:00
parent 773d98a4fb
commit 2f4d23d878
3 changed files with 23 additions and 1 deletions

View File

@ -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;

View File

@ -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");
}
}
/// <summary>
/// Controlling faction of the station this entry was made/turned into.
/// </summary>

View File

@ -63,7 +63,8 @@
<HierarchicalDataTemplate>
<StackPanel Orientation="Horizontal">
<CheckBox Focusable="False" IsChecked="{Binding IsEnabled}" VerticalAlignment="Center"/>
<TextBlock Text="{Binding Name}"/>
<TextBlock Text="{Binding CompletedAt}" Margin="5,0,5,0" HorizontalAlignment="Right"/>
<TextBlock Text="{Binding Name}" FontWeight="DemiBold"/>
</StackPanel>
</HierarchicalDataTemplate>
</HierarchicalDataTemplate.ItemTemplate>