From fcb2f62646eaa718b954d50334c97e568e8230f2 Mon Sep 17 00:00:00 2001 From: szporowolik Date: Sat, 19 Oct 2019 12:26:18 +0200 Subject: [PATCH] Fixed version displayed in title bar --- 02_Windows_App/Perun_v1/01_Classes/PerunHelper.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/02_Windows_App/Perun_v1/01_Classes/PerunHelper.cs b/02_Windows_App/Perun_v1/01_Classes/PerunHelper.cs index c77dbf2..a8b8395 100644 --- a/02_Windows_App/Perun_v1/01_Classes/PerunHelper.cs +++ b/02_Windows_App/Perun_v1/01_Classes/PerunHelper.cs @@ -1,5 +1,6 @@ // This class gathers all helper functions using System; +using System.Reflection; internal class PerunHelper { @@ -21,6 +22,10 @@ internal class PerunHelper System.Deployment.Application.ApplicationDeployment cd = System.Deployment.Application.ApplicationDeployment.CurrentDeployment; Globals.strPerunVersion = cd.CurrentVersion.ToString(); } + else + { + Globals.strPerunVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + } return strBeginning+"v" + Globals.strPerunVersion; } } \ No newline at end of file