Locks this AnnObject with the specified password.
public virtual void Lock(string password)
Public Overridable Sub Lock( _ByVal password As String _)
public:virtual void Lock(String^ password)
password
String containing the password used to lock the annotation object.
Only unlocked objects can be locked. If an object is already locked, it will stay locked with its original password. You must pass the same password to Unlock to unlock this AnnObject.
If this method succeeds,
An object must be unlocked in order to change that object in automated mode.
For more information, refer to Implementing WPF Annotation Security.
This method changes the 'lock' state of an object.
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsPublic Sub AnnObject_Lock(ByVal obj As AnnObject, ByVal password As String)If obj.IsLocked ThenMessageBox.Show("Object is locked. It will be unlocked.")If String.Compare(password, obj.Password, False) <> 0 ThenMessageBox.Show("Invalid password!!")Elseobj.Unlock(password)End IfElseMessageBox.Show("Object was not locked. It will be locked now.")obj.Lock(password)End IfEnd Sub
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Demos;using Leadtools.Help;public void AnnObject_Lock(AnnObject obj, string password){if(obj.IsLocked){MessageBox.Show("Object is locked. It will be unlocked.");if(string.Compare(password, obj.Password, false) != 0)MessageBox.Show("Invalid password!!");elseobj.Unlock(password);}else{MessageBox.Show("Object was not locked. It will be locked now.");obj.Lock(password);}}
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Examples;public void AnnObject_Lock(AnnObject obj, string password){if(obj.IsLocked){MessageBox.Show("Object is locked. It will be unlocked.");if(string.Compare(password, obj.Password, StringComparison.Ordinal) != 0)MessageBox.Show("Invalid password!!");elseobj.Unlock(password);}else{MessageBox.Show("Object was not locked. It will be locked now.");obj.Lock(password);}}
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsPublic Sub AnnObject_Lock(ByVal obj As AnnObject, ByVal password As String)If obj.IsLocked ThenMessageBox.Show("Object is locked. It will be unlocked.")If String.Compare(password, obj.Password, StringComparison.Ordinal) <> 0 ThenMessageBox.Show("Invalid password!!")Elseobj.Unlock(password)End IfElseMessageBox.Show("Object was not locked. It will be locked now.")obj.Lock(password)End IfEnd Sub
|
Products |
Support |
Feedback: Lock Method (AnnObject) - Leadtools.Windows.Annotations |
Introduction |
Help Version 19.0.2017.3.22
|

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.