LEADTOOLS Annotations (Leadtools.Annotations assembly)

Cancel Method (AnnAutomation)

Show in webframe
Example 





Cancels the operation currently being performed in this AnnAutomation
Syntax
public virtual void Cancel()
'Declaration
 
Public Overridable Sub Cancel() 
'Usage
 
Dim instance As AnnAutomation
 
instance.Cancel()

            

            
public:
virtual void Cancel(); 
Remarks
Cancels any operations currently being performed in this AnnAutomation. An operation can be:
Example
Copy Code  
Imports Leadtools
Imports Leadtools.Annotations
Imports Leadtools.WinForms
Imports Leadtools.Drawing

Public Sub AnnAutomation_Cancel()
   ' subclass to the viewer mouse move event
   ' _automation is an AnnAutomation object
   AddHandler _automation.Viewer.MouseMove, AddressOf viewer_MouseMove
End Sub
Private Sub viewer_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs)
   ' check if we have a draw designer currently selected
   If Not _automation.CurrentDesigner Is Nothing AndAlso TypeOf _automation.CurrentDesigner Is AnnDrawDesigner Then
      ' check if we are over the rectangle 100,100 to 200,200
      Dim rc As Rectangle = New Rectangle(100, 100, 100, 100)
      If rc.Contains(e.X, e.Y) Then
         _automation.Cancel()
      End If
   End If
End Sub
using Leadtools;
using Leadtools.Annotations;
using Leadtools.WinForms;
using Leadtools.Drawing;

public void AnnAutomation_Cancel()
{
   // subclass to the viewer mouse move event
   // _automation is an AnnAutomation object
   _automation.Viewer.MouseMove += new MouseEventHandler(viewer_MouseMove);
}
private void viewer_MouseMove(object sender, MouseEventArgs e)
{
   // check if we have a draw designer currently selected
   if (_automation.CurrentDesigner != null && _automation.CurrentDesigner is AnnDrawDesigner)
   {
      // check if we are over the rectangle 100,100 to 200,200
      Rectangle rc = new Rectangle(100, 100, 100, 100);
      if(rc.Contains(e.X, e.Y))
         _automation.Cancel();
   }
}
Requirements

Target Platforms

See Also

Reference

AnnAutomation Class
AnnAutomation Members

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.