The RasterSupport class provides methods for setting a LEADTOOLS runtime license and unlocking support for optional LEADTOOLS features, such as LEADTOOLS Document/Medical capabilities. For activating server licenses, see Activating Server Licenses.
public static class RasterSupport Public MustInherit NotInheritable Class RasterSupport public sealed static class RasterSupport @interface LTRasterSupport : NSObject public final class RasterSupport function Leadtools.RasterSupport() public ref class RasterSupport abstract sealed For more information, refer to Unlocking Special LEAD Features.
This example will set a runtime license and check for Document support. You must obtain the proper license and developer key from LEAD.
using Leadtools;using Leadtools.Codecs;using Leadtools.ImageProcessing;string MY_LICENSE_FILE = @"d:\temp\TestLic.lic";string MY_DEVELOPER_KEY = "xyz123abc";public void SetLicenseFileExample(){RasterSupport.SetLicense(MY_LICENSE_FILE, MY_DEVELOPER_KEY);bool isLocked = RasterSupport.IsLocked(RasterSupportType.Document);if (isLocked)Console.WriteLine("Document support is locked");elseConsole.WriteLine("Document support is unlocked");}
Imports LeadtoolsImports Leadtools.CodecsImports Leadtools.ImageProcessingDim MY_LICENSE_FILE As String = "d:\\temp\\TestLic.lic"Dim MY_DEVELOPER_KEY As String = "xyz123abc"<TestMethod>Public Sub SetLicenseFileExample()RasterSupport.SetLicense(MY_LICENSE_FILE, MY_DEVELOPER_KEY)Dim isLocked As Boolean = RasterSupport.IsLocked(RasterSupportType.Document)If (isLocked) ThenConsole.WriteLine("Document support is locked")ElseConsole.WriteLine("Document support is unlocked")End IfEnd Sub
using Leadtools;using Leadtools.ImageProcessing;internal static Uri GetPackResourceUri(string resourcePath){System.Reflection.Assembly a = System.Reflection.Assembly.GetCallingAssembly();// Pull out the short name.string assemblyShortName = a.ToString().Split(',')[0];string uriString = "/" + assemblyShortName + ";component/" + resourcePath;return new Uri(uriString, UriKind.Relative);}public void UnlockDocumentSupportExample(){//The license file should be added as a Resource to your project.System.Windows.Resources.StreamResourceInfo licenseInfo = Application.GetResourceStream(GetPackResourceUri("Resources/License.lic"));string developerKey = "Place Developer Key here";RasterSupport.SetLicense(licenseInfo.Stream, developerKey);// Check if the support is locked nowbool isLocked = RasterSupport.IsLocked(RasterSupportType.Document);if (isLocked)Console.WriteLine("Document support is locked");elseConsole.WriteLine("Document support is unlocked");}
Imports LeadtoolsImports Leadtools.ImageProcessingFriend Shared Function GetPackResourceUri(ByVal resourcePath As String) As UriDim a As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly()' Pull out the short name.Dim assemblyShortName As String = a.ToString().Split(","c)(0)Dim uriString As String = "/" & assemblyShortName & ";component/" & resourcePathReturn New Uri(uriString, UriKind.Relative)End FunctionPublic Sub UnlockDocumentSupportExample()'The license file should be added as a Resource to your project.Dim licenseInfo As System.Windows.Resources.StreamResourceInfo = Application.GetResourceStream(GetPackResourceUri("Resources/License.lic"))Dim developerKey As String = "Place Developer Key here"RasterSupport.SetLicense(licenseInfo.Stream, developerKey)' Check if the support is locked nowDim isLocked As Boolean = RasterSupport.IsLocked(RasterSupportType.Document)If isLocked ThenConsole.WriteLine("Document support is locked")ElseConsole.WriteLine("Document support is unlocked")End IfEnd Sub
|
Products |
Support |
Feedback: RasterSupport Class - Leadtools |
Introduction |
Help Version 19.0.2017.6.19
|

Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.