Esempio n. 1
0
            // Token: 0x06000553 RID: 1363 RVA: 0x000154A8 File Offset: 0x000136A8
            public DrawingDataClass(DateTime date, string revision, string author)
            {
                bool camexportUseZeroDate = DbgModesContainer.Instance().CAMExportUseZeroDate;

                if (camexportUseZeroDate)
                {
                    this.Date = "00.00.0000";
                }
                else
                {
                    this.Date = date.ToString("dd.MM.yyyy");
                }
                this.Revision = revision;
                this.Author   = author;
            }
Esempio n. 2
0
        /// <summary>
        /// 获取当前的版本信息
        /// </summary>
        /// <returns></returns>
        private static string GetFileVersion()
        {
            bool   camexportUseZeroDate = DbgModesContainer.Instance().CAMExportUseZeroDate;
            string result;

            if (camexportUseZeroDate)
            {
                result = "19.0.0.0";
            }
            else
            {
                Assembly assembly = typeof(ItCreatePXML).Assembly;
                try
                {
                    string   codeBase  = assembly.CodeBase;
                    Uri      uri       = new Uri(codeBase);
                    string   localPath = uri.LocalPath;
                    FileInfo fileInfo  = new FileInfo(localPath);
                    bool     flag      = !fileInfo.Exists;
                    if (flag)
                    {
                        result = assembly.GetName().Version.ToString();
                    }
                    else
                    {
                        FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(localPath);
                        result = versionInfo.ProductVersion;
                    }
                }
                catch
                {
                    result = assembly.GetName().Version.ToString();
                }
            }
            return(result);
        }