private static string GetClientVersion()
{
string ExeDir = GlobalSettings.Default.StartupPath;
//Never make an assumption that a file exists.
if (File.Exists(ExeDir + "\\Client.manifest"))
{
using (BinaryReader Reader = new BinaryReader(File.Open(ExeDir + "\\Client.manifest", FileMode.Open, FileAccess.Read, FileShare.Read)))
{
return Reader.ReadString() + ".0"; //Last version number is unused.
}
}
else
{
//Version as of writing this method.
return "0.1.26.0";
}
}