Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.3.29
|
Leadtools.Annotations.Automation Assembly > Leadtools.Annotations.Automation Namespace > AnnAutomation Class : EndDesigner Method |
public virtual void EndDesigner()
'Declaration
Public Overridable Sub EndDesigner()
public virtual void EndDesigner()
-(void) endDesigner;
public void endDesigner()
function Leadtools.Annotations.Automation.AnnAutomation.EndDesigner()
Ends (and commits) any operation currently being performed in this AnnAutomation. An operation can be:
(Design user mode) A AnnDrawDesigner is drawing a new object.
(Design user mode) A AnnEditDesigner is editing an existing object.
(Design user mode) The user is selecting a group of objects.
(Run user mode) A AnnRunDesigner is running an object.
This works like Cancel, except the current designer is ended, if it's a multi-draw designer such as Polyline, the object is added. If it's an edit designer, it is stops being edited (if text designer for example, the text editor goes away).
To abort the current operation without committing, use Cancel.
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
}