Unlocks the LEADTOOLS PACS Framework.
Syntax
Visual Basic (Declaration) | |
---|
Overloads Public Function Unlock( _
ByVal code As String _
) As Boolean |
Parameters
- code
- The LEADTOOLS PACS Framework unlock key.
Return Value
true if the LEADTOOLS PACS Framework was successfully unlocked.
Example
Check to see if LEADTOOLS Dicom Server Framework has been unlocked or is in evaluation mode.
Visual Basic | Copy Code |
---|
Public Sub LockCheck()
Dim admin As ServiceAdministrator = New ServiceAdministrator("C:\Program Files\LEAD Technologies, Inc\Leadtools Dicom Server Framework")
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")
If admin.IsLocked Then
Console.WriteLine("Invalid unlock code")
Return
Else
'
' Once unlocked the Services property will be valid
'
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("Support is Unlocked")
Else
If admin.IsExpired Then
Console.WriteLine("Evaluation has expired")
End If
End If
End Sub |
C# | Copy Code |
---|
public void LockCheck()
{
ServiceAdministrator admin = new ServiceAdministrator(@"C:\Program Files\LEAD Technologies, Inc\Leadtools Dicom Server Framework");
if(!admin.IsEval)
{
//
// If it isn't an eval then we need to unlock
//
if(admin.IsLocked)
{
admin.Unlock("Substitute Your Code");
if(admin.IsLocked)
{
Console.WriteLine("Invalid unlock code");
return;
}
else
{
//
// Once unlocked the Services property will be valid
//
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("Support is Unlocked");
}
else
{
if(admin.IsExpired)
{
Console.WriteLine("Evaluation has expired");
}
}
} |
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7
See Also