←Select platform

Cancel Method

Summary

Cancels the operation currently being performed in this AnnAutomation.

Syntax
C#
VB
Java
Objective-C
C++
public virtual void Cancel() 
Public Overridable Sub Cancel()  
-(void) cancel; 
public void cancel() 
public:  
   virtual void Cancel() 

Remarks

Cancels any operation currently being performed in this AnnAutomation. An operation can be:

  • (Design user mode) An AnnDrawDesigner is drawing a new object.

  • (Design user mode) An AnnEditDesigner is editing an existing object.

  • (Design user mode) The user is selecting a group of objects.

  • (Run user mode) An AnnRunDesigner is running an object.

To end the current operation with committing, use EndDesigner.

Use the following code snippet to determine the type of operation currently being performed by this automation:

// Get the current designer 
AnnDesigner designer = annAutomation.CurrentDesigner; 
if(designer is AnnDrawDesigner) 
{ 
   // Drawing. You can cast further to get the specific draw designer or check the object ID using designer.TargetObject.Id 
   // You can also use designer.HasStarted to check whether the designer has started working (is actually drawing an object) 
} 
else if(designer is AnnEditDesigener) 
{ 
   // Edit. You can cast further to get the specific draw designer or check the object ID using designer.TargetObject.Id 
   // You can also use designer.HasStarted to check whether the designer has started working (is actually editing an object) 
} 
else if(designer is AnnRunDesigener) 
{ 
   // Run. You can cast further to get the specific draw designer or check the object ID using designer.TargetObject.Id 
} 
else 
{ 
   // No operation 
} 

Requirements

Target Platforms

Help Version 20.0.2019.9.19
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2019 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Annotations.Automation Assembly