/// <summary> /// Returns the application name, with the version string. i.e., "Paint.NET v2.5 (Beta 2 Debug build 1.0.*.*)" /// </summary> /// <returns></returns> public static string GetFullAppName() { string fullAppNameFormat = PdnResources.GetString("PdnInfo.FullAppName.Format"); string fullAppName = string.Format(fullAppNameFormat, PdnInfo.GetProductName(false), GetVersionString()); return(fullAppName); }
/// <summary> /// For final builds, this returns PdnInfo.GetProductName() (i.e., "Paint.NET v2.2") /// For non-final builds, this returns GetFullAppName() /// </summary> /// <returns></returns> public static string GetAppName() { if (PdnInfo.IsFinalBuild && !PdnInfo.IsDebugBuild) { return(PdnInfo.GetProductName(false)); } else { return(GetFullAppName()); } }
/// <summary> /// Checks if the build is expired, and displays a dialog box that takes the user to /// the Paint.NET website if necessary. /// </summary> /// <returns>true if the user should be allowed to continue, false if the build has expired</returns> public static bool HandleExpiration(IWin32Window owner) { if (IsExpired) { string expiredMessage = PdnResources.GetString("ExpiredDialog.Message"); DialogResult result = MessageBox.Show(expiredMessage, PdnInfo.GetProductName(true), MessageBoxButtons.OKCancel); if (result == DialogResult.OK) { string expiredRedirect = InvariantStrings.ExpiredPage; PdnInfo.LaunchWebSite(owner, expiredRedirect); } return(false); } return(true); }