From b5dfe6160ff7080fe25de822277ec9913c9a3d6a Mon Sep 17 00:00:00 2001 From: Nazar Derevetskyy Date: Tue, 1 Mar 2022 01:06:13 -0500 Subject: [PATCH] Set app version and display it in the title --- FFS/App.xaml.cs | 7 +++++++ FFS/FFS.csproj | 15 +++++++++++++++ FFS/Properties/AssemblyInfo.cs | 4 ++-- FFS/Properties/Resources.resx | 13 ++++++++----- FFS/Properties/Settings.Designer.cs | 2 +- 5 files changed, 33 insertions(+), 8 deletions(-) diff --git a/FFS/App.xaml.cs b/FFS/App.xaml.cs index 627cbc1..3b30eb8 100644 --- a/FFS/App.xaml.cs +++ b/FFS/App.xaml.cs @@ -29,6 +29,13 @@ public App() SetupLogger(); MainWindow window = new MainWindow() {DataContext = DI.GetService()}; + + Version version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; + if (version != null) + window.Title = $"FFS v{version.Major}.{version.Minor}.{version.Revision}"; + else + window.Title = "FFS, no version?"; + window.Show(); } diff --git a/FFS/FFS.csproj b/FFS/FFS.csproj index 66f05a8..0bad63b 100644 --- a/FFS/FFS.csproj +++ b/FFS/FFS.csproj @@ -24,6 +24,8 @@ app.manifest true + 0.1 + 0.1 @@ -87,4 +89,17 @@ + + + True + True + Settings.settings + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + \ No newline at end of file diff --git a/FFS/Properties/AssemblyInfo.cs b/FFS/Properties/AssemblyInfo.cs index 700c3b1..42808af 100644 --- a/FFS/Properties/AssemblyInfo.cs +++ b/FFS/Properties/AssemblyInfo.cs @@ -49,5 +49,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("0.1.0")] +[assembly: AssemblyFileVersion("0.1.0")] diff --git a/FFS/Properties/Resources.resx b/FFS/Properties/Resources.resx index af7dbeb..1af7de1 100644 --- a/FFS/Properties/Resources.resx +++ b/FFS/Properties/Resources.resx @@ -46,7 +46,7 @@ mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 @@ -60,6 +60,7 @@ : and then encoded with base64 encoding. --> + @@ -68,9 +69,10 @@ - + + @@ -85,9 +87,10 @@ - + + @@ -109,9 +112,9 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file diff --git a/FFS/Properties/Settings.Designer.cs b/FFS/Properties/Settings.Designer.cs index 140bd9d..3cc0ca2 100644 --- a/FFS/Properties/Settings.Designer.cs +++ b/FFS/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace FFS.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));