#1
Posted
:
Tuesday, February 13, 2018 8:00:05 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 89
Was thanked: 4 time(s) in 4 post(s)
During an Evaluation the License and Key that you are provided with Unlocks access to the entire LEADTOOLS v20 SDK.
This makes needing to test the License unnecessary during an evaluation.
During the purchase of a License and Key, however, you typically will only Unlock those particular aspects of the SDK that are necessary for your development or deployment needs.
Or with the purchase of several different Licenses that Unlock different aspects of the SDK, this can sometimes become confusing.
Below we have a small application that will iterate through all of the Unlocks and provide an easy console output of each part of the SDK and whether the License being tested is Unlocked or Not for that support.
C#Code:static void Main(string[] args)
{
// Set your License and Key file paths here
string licenseFilePath = @"Set License Filepath here";
string keyFilePath = System.IO.File.ReadAllText(@"Set Key Filepath here");
RasterSupport.SetLicense(licenseFilePath, keyFilePath);
bool isLocked;
var values = EnumUtil.GetValues<RasterSupportType>();
// iterate though each RasterSupportType
foreach (var element in values)
{
isLocked = RasterSupport.IsLocked(element);
if (isLocked)
Console.WriteLine("Locked support for " + element);
else
Console.WriteLine("Unlocked support for " + element);
}
Console.ReadLine();
}
public static class EnumUtil
{
public static IEnumerable<T> GetValues<T>()
{
return Enum.GetValues(typeof(T)).Cast<T>();
}
}
Chris Thompson
Developer Support Engineer
LEAD Technologies, Inc.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.