Skip to content

Commit

Permalink
Added version number
Browse files Browse the repository at this point in the history
  • Loading branch information
Gurrenm3 authored and Gurrenm3 committed Aug 31, 2020
1 parent a5f75fa commit bef05a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions BTD6 Mod Manager.wpf/MainWindow.xaml
Expand Up @@ -79,6 +79,8 @@

<Separator Margin="8,0,8,0"/>
<Button x:Name="Launch_Button" Content="Launch" Background="#FF5BC900" Width="100" Height="30" BorderBrush="Black" FontSize="16" Click="Launch_Button_Click" Foreground="White"/>
<Separator Margin="8,0,8,0" Background="#FF383838"/>
<TextBlock x:Name="Version_TextBlock" Text="Version" Foreground="#FF8D8D8D" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</ToolBar>
</ToolBarPanel>

Expand Down
8 changes: 8 additions & 0 deletions BTD6 Mod Manager.wpf/MainWindow.xaml.cs
Expand Up @@ -10,6 +10,7 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -60,6 +61,13 @@ private void Startup()
UserData.UserDataLoaded += UserData_UserDataLoaded;
TempSettings.Instance.LoadSettings();
TempSettings.Instance.SaveSettings();

string version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
string[] split = version.Split('.');

if (split.Length - 1 > 2)
version = version.Remove(version.Length - 2, 2);
Version_TextBlock.Text = "Version " + version;
}

private void OnFinishedLoading()
Expand Down

0 comments on commit bef05a7

Please sign in to comment.