mirror of
https://github.com/ncblakely/GiantsTools
synced 2024-11-24 23:25:37 +01:00
28 lines
660 B
C#
28 lines
660 B
C#
|
namespace Giants.Launcher
|
|||
|
{
|
|||
|
using System;
|
|||
|
using System.Diagnostics;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
public static class VersionHelper
|
|||
|
{
|
|||
|
public static Version GetGameVersion(string gamePath)
|
|||
|
{
|
|||
|
try
|
|||
|
{
|
|||
|
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(gamePath);
|
|||
|
return new Version(fvi.FileVersion.Replace(',', '.'));
|
|||
|
}
|
|||
|
catch (Exception)
|
|||
|
{
|
|||
|
return null;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public static Version GetLauncherVersion()
|
|||
|
{
|
|||
|
return new Version(Application.ProductVersion);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|