This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string Version() | |
{ | |
var x86Folderpath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86); | |
const string exeRelativepath = @"SDL\SDL Trados Studio\Studio4\SDLTradosStudio.exe"; | |
var exeFullpath = Path.Combine(x86Folderpath, exeRelativepath); | |
var assembly = Assembly.LoadFrom(exeFullpath); | |
var resourceManager = new ResourceManager("Sdl.TranslationStudio.Application.StringResources", assembly); | |
var version = string.Format(resourceManager.GetString("Version"), | |
$"- {FileVersionInfo.GetVersionInfo(exeFullpath).FileVersion}"); | |
return version; |