Skip to content

Commit 2dd20a2

Browse files
committed
Set version to 0.0.1.0 and show version in title.
1 parent 71ac78a commit 2dd20a2

4 files changed

Lines changed: 19 additions & 2 deletions

File tree

INIManagerProject/INIManagerProject.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
</Reference>
5454
<Reference Include="System" />
5555
<Reference Include="System.Data" />
56+
<Reference Include="System.Deployment" />
5657
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5758
<HintPath>..\packages\Expression.Blend.Sdk.WPF.1.0.1\lib\net45\System.Windows.Interactivity.dll</HintPath>
5859
</Reference>

INIManagerProject/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@
5151
// You can specify all the values or you can default the Build and Revision Numbers
5252
// by using the '*' as shown below:
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("1.0.0.0")]
55-
[assembly: AssemblyFileVersion("1.0.0.0")]
54+
[assembly: AssemblyVersion("0.0.1.0")]
55+
[assembly: AssemblyFileVersion("0.0.1.0")]

INIManagerProject/src/View/MainWindow.xaml.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.Collections.Generic;
77
using System.Collections.ObjectModel;
88
using System.ComponentModel;
9+
using System.Deployment.Application;
910
using System.IO;
1011
using System.Linq;
1112
using System.Reflection;
@@ -43,6 +44,7 @@ public MainWindow()
4344
_mainWindowViewModel = new MainWindowViewModel();
4445
DataContext = _mainWindowViewModel;
4546
InitializeComponent();
47+
this.Title = "INI Manager " + getRunningVersion();
4648
}
4749
catch (Exception ex)
4850
{
@@ -115,5 +117,17 @@ private void mnuExit_Click(object sender, RoutedEventArgs e)
115117
{
116118
this.Close();
117119
}
120+
121+
private Version getRunningVersion()
122+
{
123+
try
124+
{
125+
return ApplicationDeployment.CurrentDeployment.CurrentVersion;
126+
}
127+
catch (Exception)
128+
{
129+
return Assembly.GetExecutingAssembly().GetName().Version;
130+
}
131+
}
118132
}
119133
}

INIManagerProject/src/ViewModel/MainWindowViewModel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
using System.Windows;
1212
using System.Windows.Controls;
1313
using System.Windows.Input;
14+
using System.Deployment.Application;
15+
using System.Reflection;
1416

1517
namespace INIManagerProject.ViewModel
1618
{

0 commit comments

Comments
 (0)