Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, August 14, 2012 5:50:26 AM(UTC)


Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

For developers using our Silverlight binaries and having difficulty understanding how to use the RasterSupport.SetLicense() method, here is a step-by-step guide on how you can modify our SDK demos to include your licensing information:

1.) In the Solution Explorer, create a folder called "Resources".
2.) Right click on the new "Resources" folder. Select the option for adding an existing item. Select your LIC file
3.) Highlight the new LIC file that's been added to the solution explore. Right-click on it, and bring up the property page. Change the Build action to be "Resource".
4.) In the code, change the value passed to the "GetPackResourceUri()" method to point to your file name. It should be something like GetPackResourceUri("Resources/Your_File_Name_Here.lic")
5.) Modify the "developerKey" variable to include the contents of the key file.
6.) Compile and run the project.

Please note that if the StreamResourceInfo instance is null, accessing the Stream property will cause the demo to hang. Checking the StreamResourceInfo instance itself though will not be a problem. Here is sample code illustrating how I updated the demo to run:
      public static void SetLicense()
         // Uncomment this and add your developer key and license resource file stream
         System.Windows.Resources.StreamResourceInfo licenseInfo = Application.GetResourceStream(GetPackResourceUri("Resources/MyFile.lic"));
         string developerKey = "==CONTENTS_OF_KEY_FILE==";
         if (licenseInfo != null)
            RasterSupport.SetLicense(licenseInfo.Stream, developerKey);
            MessageBox.Show("Cannot set license file. Stream is not valid.", "Error setting license file", MessageBoxButton.OK);


If you have any questions or issues with this, please send an email to support@leadtools.com.
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

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.

Powered by YAF.NET | YAF.NET © 2003-2023, Yet Another Forum.NET
This page was generated in 0.056 seconds.