/// ------------------------------------------------------------------------------------ public static string GetBuildTypeDescriptor(BuildType.VersionType buildType) { string type; switch (buildType) { case BuildType.VersionType.Debug: type = "Debug"; // Not localizable break; case BuildType.VersionType.Alpha: type = LocalizationManager.GetString("BuildType.Alpha", "Alpha"); break; case BuildType.VersionType.Beta: type = LocalizationManager.GetString("BuildType.Beta", "Beta"); break; case BuildType.VersionType.ReleaseCandidate: type = LocalizationManager.GetString("BuildType.ReleaseCandidate", "Release Candidate"); break; default: return(string.Empty); } return(string.Format("({0})", type)); }
/// ------------------------------------------------------------------------------------ public static string GetVersionInfo(string fmt, BuildType.VersionType buildType) { var asm = Assembly.GetExecutingAssembly(); var ver = asm.GetName().Version; var file = asm.CodeBase.Replace("file:", string.Empty); file = file.TrimStart('/'); var fi = new FileInfo(file); return(string.Format(fmt, ver.Major, ver.Minor, ver.Build, GetBuildTypeDescriptor(buildType), fi.LastWriteTime.ToString("dd-MMM-yyyy"))); }
/// ------------------------------------------------------------------------------------ public static string GetBuildTypeDescriptor(BuildType.VersionType buildType) { string type; switch (buildType) { case BuildType.VersionType.Debug: type = "Debug"; // Not localizable break; case BuildType.VersionType.Alpha: type = LocalizationManager.GetString("BuildType.Alpha", "Alpha"); break; case BuildType.VersionType.Beta: type = LocalizationManager.GetString("BuildType.Beta", "Beta"); break; case BuildType.VersionType.ReleaseCandidate: type = LocalizationManager.GetString("BuildType.ReleaseCandidate", "Release Candidate"); break; default: string sBuildType = buildType.ToString(); var sb = new StringBuilder(sBuildType); for (int i = 1; i < sBuildType.Length; i++) { if (IsUpper(sb[i])) { sb.Insert(i++, ' '); } } type = LocalizationManager.GetDynamicString("SayMore", "BuildType." + sBuildType, sb.ToString()); break; } return($"({type})"); }
/// ------------------------------------------------------------------------------------ /// <summary> /// /// </summary> /// ------------------------------------------------------------------------------------ public SplashScreenForm(bool showBuildNum, BuildType.VersionType versionType) : this() { m_showBuildNum = showBuildNum; m_versionType = versionType; }