diff --git a/Filtration/Properties/AssemblyInfo.cs b/Filtration/Properties/AssemblyInfo.cs index e5838f4..3bba460 100644 --- a/Filtration/Properties/AssemblyInfo.cs +++ b/Filtration/Properties/AssemblyInfo.cs @@ -50,7 +50,7 @@ using System.Windows; // 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("0.2.*")] +[assembly: AssemblyVersion("0.3.*")] [assembly: InternalsVisibleTo("Filtration.Tests")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] \ No newline at end of file diff --git a/Filtration/Views/AboutWindow.xaml b/Filtration/Views/AboutWindow.xaml index 55d4a88..d006756 100644 --- a/Filtration/Views/AboutWindow.xaml +++ b/Filtration/Views/AboutWindow.xaml @@ -7,7 +7,10 @@ Height="360" Width="580" Loaded="AboutWindow_OnLoaded" - BorderThickness="1" BorderBrush="Black"> + BorderThickness="1" + BorderBrush="Black" + ShowMaxRestoreButton="False" + ShowMinButton="False"> <Grid Margin="15"> <Grid.RowDefinitions> <RowDefinition Height="Auto"></RowDefinition> @@ -29,7 +32,7 @@ <Image Source="/Filtration;component/Resources/logo.png" Width="75" Height="75" VerticalAlignment="Top" /> <StackPanel Grid.Row="0" Grid.Column="1"> <TextBlock FontWeight="Black">Filtration</TextBlock> - <TextBlock>Version 0.2</TextBlock> + <TextBlock Text="{Binding Version}" /> <TextBlock>Copyright © 2015</TextBlock> <TextBlock>Created by Ben Wallis</TextBlock> <TextBlock> diff --git a/Filtration/Views/AboutWindow.xaml.cs b/Filtration/Views/AboutWindow.xaml.cs index 800b608..0facfaa 100644 --- a/Filtration/Views/AboutWindow.xaml.cs +++ b/Filtration/Views/AboutWindow.xaml.cs @@ -1,4 +1,6 @@ -using System.Windows; +using System.Diagnostics; +using System.Reflection; +using System.Windows; namespace Filtration.Views { @@ -7,6 +9,7 @@ namespace Filtration.Views public AboutWindow() { InitializeComponent(); + DataContext = this; } private void AboutWindow_OnLoaded(object sender, RoutedEventArgs e) @@ -16,5 +19,15 @@ namespace Filtration.Views Left = mainWindow.Left + (mainWindow.Width - ActualWidth) / 2; Top = mainWindow.Top + (mainWindow.Height - ActualHeight) / 2; } + + public string Version + { + get + { + var assembly = Assembly.GetExecutingAssembly(); + var fvi = FileVersionInfo.GetVersionInfo(assembly.Location); + return "Version " + fvi.FileMajorPart + "." + fvi.FileMinorPart; + } + } } }