Skip to content

Commit

Permalink
Added build date to title
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUnlocked committed Sep 5, 2020
1 parent f0b74e1 commit 1f6e44d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
using System.Runtime.InteropServices.ComTypes;
using System.Text;
using System.Threading.Tasks;
using System.Reflection;
using System.Globalization;

namespace DarkestDungeonRandomizer
{
Expand Down Expand Up @@ -40,6 +42,9 @@ public class MainViewModel : ReactiveObject
public Dictionary<string, Monster> 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;

Expand Down
2 changes: 1 addition & 1 deletion MainWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -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})'}">
<Window.Styles>
<Style Selector="Button, CheckBox, TextBox, TextBlock, Slider">
<Setter Property="Margin" Value="3"/>
Expand Down

0 comments on commit 1f6e44d

Please sign in to comment.