Updated to include new dir, inclusion of tags. Version appears in Control Panel now. Also appears in TItlebar of AppWindow.
This commit is contained in:
@@ -57,8 +57,24 @@ namespace LD_SysInfo
|
||||
System.Net.ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;
|
||||
|
||||
InitializeComponent();
|
||||
var fvi = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
|
||||
VersionTextBlock.Text = $"v{fvi.ProductVersion}";
|
||||
var exePath = Assembly.GetEntryAssembly()?.Location;
|
||||
|
||||
if (string.IsNullOrEmpty(exePath))
|
||||
{
|
||||
exePath = Process.GetCurrentProcess().MainModule?.FileName;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(exePath))
|
||||
{
|
||||
var fvi = FileVersionInfo.GetVersionInfo(exePath);
|
||||
var productVersion = fvi.ProductVersion ?? "0.0.0";
|
||||
var cleanVersion = productVersion.Split('+')[0];
|
||||
VersionTextBlock.Text = $"v{cleanVersion}";
|
||||
}
|
||||
else
|
||||
{
|
||||
VersionTextBlock.Text = "v0.0.0";
|
||||
}
|
||||
LoadConfig();
|
||||
DisplaySystemInfo();
|
||||
AutoLogin();
|
||||
|
||||
Reference in New Issue
Block a user