Skip to content

Commit

Permalink
Show app version number in form title.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrpeardotnet committed Sep 1, 2015
1 parent 49aa034 commit 459ffa6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions WinProdKeyFind/MainForm.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Diagnostics;
using System.Reflection;
using System.Windows.Forms;
using Timer = System.Timers.Timer;

Expand All @@ -14,6 +15,8 @@ public MainForm()

private void MainForm_Shown(object sender, EventArgs e)
{
var assemblyName = AssemblyName.GetAssemblyName(Assembly.GetExecutingAssembly().Location);
Text = String.Format("{0} v{1}.{2}", Text, assemblyName.Version.Major, assemblyName.Version.Minor);
GetKey();
}
private void GetKey()
Expand Down
4 changes: 2 additions & 2 deletions WinProdKeyFind/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
2 changes: 1 addition & 1 deletion WinProdKeyFind/WinProdKeyFind.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
Expand All @@ -24,7 +25,6 @@
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
Expand Down

0 comments on commit 459ffa6

Please sign in to comment.