Пример #1
0
        private string GetFileInfo(string fileName)
        {
            string ret = "";

            if (File.Exists(fileName))
            {
                string          fileTime = Pub.GetFileTimeString(fileName);
                FileVersionInfo fileVer  = FileVersionInfo.GetVersionInfo(fileName);
                ret = fileVer.ProductVersion;
                if (ret == null)
                {
                    ret = "";
                }
                if (ret == "")
                {
                    ret = fileTime;
                }
                else
                {
                    ret = ret.Replace(" ", "");
                    ret = ret.Replace(',', '.');
                    ret = ret + "(" + fileTime + ")";
                }
                ret = Pub.GetFileName(fileName) + ":  " + ret + "\r\n";
            }
            return(ret);
        }