Exemple #1
0
        /// <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);
        }
Exemple #2
0
 /// <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());
     }
 }
Exemple #3
0
        /// <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);
        }