Skip to content

Commit

Permalink
Added version to title
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUnlocked committed Sep 6, 2020
1 parent 48d25a9 commit 23a92e5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
38 changes: 22 additions & 16 deletions DarkestDungeonRandomizer.csproj
@@ -1,18 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp5.0</TargetFramework>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="0.10.0-preview3" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.0-preview3" />
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.0-preview3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="ReactiveUI" Version="11.5.26" />
</ItemGroup>
<PropertyGroup>
<Nullable>Enable</Nullable>
<StartupObject>DarkestDungeonRandomizer.Program</StartupObject>
</PropertyGroup>

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp5.0</TargetFramework>
<LangVersion>preview</LangVersion>

<Version>0.6</Version>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="0.10.0-preview3" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.0-preview3" />
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.0-preview3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="ReactiveUI" Version="11.5.26" />
</ItemGroup>

<PropertyGroup>
<Nullable>Enable</Nullable>
<StartupObject>DarkestDungeonRandomizer.Program</StartupObject>
</PropertyGroup>

</Project>
6 changes: 3 additions & 3 deletions MainViewModel.cs
Expand Up @@ -42,9 +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"));
public string BuildVersion { get; } =
Assembly.GetEntryAssembly()?.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion
?? "";

private readonly Window window;

Expand Down
2 changes: 1 addition & 1 deletion MainWindow.axaml
Expand Up @@ -5,7 +5,7 @@
mc:Ignorable="d" d:DesignWidth="700" d:DesignHeight="250"
Width="700" Height="250"
x:Class="DarkestDungeonRandomizer.MainWindow"
Title="Darkest Dungeon Randomizer">
Title="{Binding Path=BuildVersion, StringFormat=Darkest Dungeon Randomizer {0}}">
<Window.Styles>
<Style Selector="Button, CheckBox, TextBox, TextBlock, Slider">
<Setter Property="Margin" Value="3"/>
Expand Down

0 comments on commit 23a92e5

Please sign in to comment.