Error processing SSI file
(Leadtools.Annotations.Automation)

Show in webframe

Edit Event






Occurs when an AnnObject is being edited.
Syntax
'Declaration
 
Public Event Edit As EventHandler(Of AnnEditDesignerEventArgs)
-(void) automation:(LTAnnAutomation*) automation editWithArgs:(LTAnnEditDesignerEventArgs*) e;
public void addEditDesignerdListener(AnnEditDesignerListener listener)
public void removeEditDesignerListener(AnnEditDesignerListener listener)
            
add_Edit(function(sender, e))
remove_Edit(function(sender, e))

Event Data

The event handler receives an argument of type AnnEditDesignerEventArgs containing data related to this event. The following AnnEditDesignerEventArgs properties provide information specific to this event.

PropertyDescription
Cancel Gets or sets a value indicating whether the edit operation should be canceled.
MoveThumbIndex Gets the index of the thumb (control point) being moved.
Object Gets the AnnObject that is being edited.
Operation Gets the type of the current edit operation.
OperationStatus Gets the status of the current edit operation.
Remarks

When an object is being edited, the automation object will hook the object edit designer's AnnEditDesigner.Edit to this event. Therefore, instead of hooking and unhooking to the various designers edit events, you can simply subscribe to this event once.

Example

This example will show how to track when an object is edited.

Start with the AnnAutomationManager example, remove all the code inside the example function (search for the // TODO: add example code here comment) and insert the following code:

Click the example button. Now whenever you move or resize an object, you will get the message.

Copy Code  
using Leadtools.Annotations.Automation;
using Leadtools.Annotations.Core;
using Leadtools.Codecs;
using Leadtools.Controls;
using Leadtools.Annotations.Rendering;
using Leadtools.Annotations.WinForms;

[TestMethod]
public void AnnAutomation_Edit()
{
   // Hook to the automation's Edit event
   _automation.Edit += _automation_Edit;
}
void _automation_Edit(object sender, AnnEditDesignerEventArgs e)
{
   if(e.OperationStatus == AnnDesignerOperationStatus.End)
      Debug.WriteLine("Object changed...");
}
using Leadtools.Annotations.Automation;
using Leadtools.Controls;
using Leadtools.Converters;
using Leadtools.Annotations.Core;
using Leadtools.Codecs;

[TestMethod]
public void AnnAutomation_Edit()
{
   // Hook to the automation's Edit event
   _automation.Edit += _automation_Edit;
}
void _automation_Edit(object sender, AnnEditDesignerEventArgs e)
{
   if(e.OperationStatus == AnnDesignerOperationStatus.End)
      Debug.WriteLine("Object changed...");
}
Requirements

Target Platforms

See Also

Reference

AnnAutomation Class
AnnAutomation Members

Error processing SSI file
  Leadtools.Annotations.Automation requires a Document or Medical toolkit license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features