locked
LicenseInformation App trial

    Question

  • void ReloadLicense()
    {
        if (licenseInformation.IsActive)
        {
             if (licenseInformation.IsTrial)
             {
                 // Show the features that are available during trial only.
             }
             else
             {
                 // Show the features that are available only with a full license.
             }
         }
         else
         {
             // A license is inactive only when there's an error.
         }
    }
    
    
    
    
    in the else messagedialog can be used
    void DisplayTrialVersionExpirationTime()
    {
        if (licenseInformation.IsActive)
        {
            if (licenseInformation.IsTrial)
            {
                var longDateFormat = new Windows.Globalization.DateTimeFormatting.DateTimeFormatter("longdate");
    												
                // Display the expiration date using the DateTimeFormatter. 
                // For example, longDateFormat.Format(licenseInformation.ExpirationDate)
    
                var daysRemaining = (licenseInformation.ExpirationDate - DateTime.Now).Days;
    
                // Let the user know the number of days remaining before the feature expires
            }
            else
            {
                // ...
            }
        }
        else
        {
           // ...
        }
    }
    in the else having also slashes will messagebox
    


    Tuesday, April 14, 2015 11:20 AM

All replies