Initializes a ServiceAdministrator object.
public bool Initialize()
Public Overloads Function Initialize() As Boolean
public:
bool Initialize();
true if the ServiceAdministrator object was successfully intialized.
Check to see if ServiceAdministrator object has been successfully initialized.
using Leadtools;
using Leadtools.Dicom.AddIn.Common;
using Leadtools.Dicom.AddIn.Interfaces;
public void LockCheck()
{
ServiceAdministrator admin = new ServiceAdministrator(@"C:\LEADTOOLS 20\Bin\Dotnet\Win32");
if (!admin.IsEval)
{
//
// If it isn't an eval then we need to set the license file.
//
if (admin.IsLocked)
{
//admin.Unlock("Substitute Your Code");
string MY_LICENSE_FILE = "d:\\temp\\TestLic.lic";
string MY_DEVELOPER_KEY = "xyz123abc";
RasterSupport.SetLicense(MY_LICENSE_FILE, MY_DEVELOPER_KEY);
if (admin.IsLocked)
{
Console.WriteLine("Invalid license");
return;
}
else
{
//
// Once unlocked initialize the services
//
admin.Initialize();
foreach (KeyValuePair<string, DicomService> service in admin.Services)
{
Console.WriteLine(service.Value.Settings.AETitle);
foreach (IAddInOptions option in service.Value.AddInOptions)
{
Console.WriteLine("Option: {0}", option.Text);
}
}
}
}
Console.WriteLine("License file valid.");
}
else
{
if (admin.IsExpired)
{
Console.WriteLine("Evaluation has expired");
}
}
}
Imports Leadtools
Imports Leadtools.Dicom.AddIn.Common
Imports Leadtools.Dicom.AddIn.Interfaces
Public Sub LockCheck()
Dim admin As ServiceAdministrator = New ServiceAdministrator("C:\LEADTOOLS 20\Bin\DotNet4\Win32")
If (Not admin.IsEval) Then
'
' If it isn't an eval then we need to unlock
'
If admin.IsLocked Then
'admin.Unlock("Substitute Your Code")
Dim MY_LICENSE_FILE As String = "d:\temp\TestLic.lic"
Dim MY_DEVELOPER_KEY As String = "xyz123abc"
RasterSupport.SetLicense(MY_LICENSE_FILE, MY_DEVELOPER_KEY)
If admin.IsLocked Then
Console.WriteLine("Invalid license")
Return
Else
'
' Once unlocked the Services property will be valid
'
admin.Initialize()
For Each service As KeyValuePair(Of String, DicomService) In admin.Services
Console.WriteLine(service.Value.Settings.AETitle)
For Each o As IAddInOptions In service.Value.AddInOptions
Console.WriteLine("Option: {0}", o.Text)
Next o
Next service
End If
End If
Console.WriteLine("License file valid.")
Else
If admin.IsExpired Then
Console.WriteLine("Evaluation has expired")
End If
End If
End Sub
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
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.