Exemplo n.º 1
0
        public static WindowsApplication FromPath(string fullPath)
        {
            var    versionInfo = FileVersionInfo.GetVersionInfo(fullPath);
            string productName = versionInfo.ProductName;

            return(new WindowsApplication()
            {
                FullName = fullPath,
                Icon = CacheDictionary.HasIcon(fullPath) ? CacheDictionary.Get(fullPath) : IconExtractor.SaveIcon(fullPath),
                Name = productName == null?Path.GetFileNameWithoutExtension(fullPath) : productName,
                           Version = versionInfo.FileVersion
            });
        }