From 8119018f33826d47b74f7aaa7924ba9727b75bb6 Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 14 Jun 2015 21:11:25 +0100 Subject: [PATCH] Changed About Window to --- Filtration/Properties/AssemblyInfo.cs | 2 +- Filtration/Views/AboutWindow.xaml | 7 +++++-- Filtration/Views/AboutWindow.xaml.cs | 15 ++++++++++++++- 3 files changed, 20 insertions(+), 4 deletions(-) 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"> @@ -29,7 +32,7 @@ Filtration - Version 0.2 + Copyright © 2015 Created by Ben Wallis 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; + } + } } }