From 1f6e44d043c97653442b6035c78071b6bb9f4c6d Mon Sep 17 00:00:00 2001 From: Unlocked <10186337+TheUnlocked@users.noreply.github.com> Date: Sat, 5 Sep 2020 14:12:07 -0700 Subject: [PATCH] Added build date to title --- MainViewModel.cs | 5 +++++ MainWindow.axaml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/MainViewModel.cs b/MainViewModel.cs index df760f3..e331b43 100644 --- a/MainViewModel.cs +++ b/MainViewModel.cs @@ -12,6 +12,8 @@ using System.Runtime.InteropServices.ComTypes; using System.Text; using System.Threading.Tasks; +using System.Reflection; +using System.Globalization; namespace DarkestDungeonRandomizer { @@ -40,6 +42,9 @@ public class MainViewModel : ReactiveObject public Dictionary Monsters { get; private set; } = null!; public string[] HeroNames { get; private set; } = null!; + public string BuildDate { get; } = + File.GetLastWriteTime(Assembly.GetExecutingAssembly().Location) + .ToString("g", CultureInfo.GetCultureInfo("en-US")); private readonly Window window; diff --git a/MainWindow.axaml b/MainWindow.axaml index 89d734f..bcb21ad 100644 --- a/MainWindow.axaml +++ b/MainWindow.axaml @@ -5,7 +5,7 @@ mc:Ignorable="d" d:DesignWidth="700" d:DesignHeight="250" Width="700" Height="250" x:Class="DarkestDungeonRandomizer.MainWindow" - Title="DarkestDungeonRandomizer"> + Title="{Binding Path=BuildDate, StringFormat='Darkest Dungeon Randomizer (Build Date: {0})'}">