Occurs after an AnnObject has been changed.
public event EventHandler<AnnAfterObjectChangedEventArgs> AfterObjectChanged Public Event AfterObjectChanged As EventHandler(Of AnnAfterObjectChangedEventArgs)
public:event EventHandler<AnnAfterObjectChangedEventArgs^>^ AfterObjectChanged
The event handler receives an argument of type AnnAfterObjectChangedEventArgs containing data related to this event. The following AnnAfterObjectChangedEventArgs properties provide information specific to this event.
| Property | Description |
|---|---|
| ChangeType | Gets the type of change. |
| Designer | Gets the designer responsible for the change. |
| Objects | Gets the objects that have been changed. |
This event will be fired after an AnnObject has been modified by this AnnAutomation.
This example will subscribe to the AfterObjectChanged event of all automations and print out a message every time an object changes.
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Demos;using Leadtools.Help;private void AnnAutomation_AfterObjectChanged(AnnAutomationManager manager){// subscribe to the AfterObjectChanged event of all automationsforeach (AnnAutomation automation in manager.Automations)automation.AfterObjectChanged += new EventHandler<AnnAfterObjectChangedEventArgs>(automation_AfterObjectChanged);}private void automation_AfterObjectChanged(object sender, AnnAfterObjectChangedEventArgs e){// print out a messagestring message;if (e.Objects != null && e.Objects.Count < 0)message = string.Format("Objects Count: " +"{0}, First object: {1}, Changed: {2}", e.Objects.Count, e.Objects[0].GetType().Name, e.ChangeType);elsemessage = String.Format("Changed: {0}", e.ChangeType);MessageBox.Show(message);}
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsPrivate Sub AnnAutomation_AfterObjectChanged(ByVal manager As AnnAutomationManager)' subscribe to the AfterObjectChanged event of all automationsFor Each automation As AnnAutomation In manager.AutomationsAddHandler automation.AfterObjectChanged, AddressOf automation_AfterObjectChangedNext automationEnd SubPrivate Sub automation_AfterObjectChanged(ByVal sender As Object, ByVal e As AnnAfterObjectChangedEventArgs)' print out a messageDim message As StringIf Not e.Objects Is Nothing AndAlso e.Objects.Count < 0 Thenmessage = String.Format("Objects Count: {0}, First object: {1}, Changed: {2}",e.Objects.Count, e.Objects(0).GetType().Name, e.ChangeType)Elsemessage = String.Format("Changed: {0}", e.ChangeType)End IfMessageBox.Show(message)End Sub
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Examples;using Leadtools.Silverlight.Demos;//using Leadtools.Help;private void AnnAutomation_AfterObjectChanged(AnnAutomationManager manager){// subscribe to the AfterObjectChanged event of all automationsforeach (AnnAutomation automation in manager.Automations)automation.AfterObjectChanged += new EventHandler<AnnAfterObjectChangedEventArgs>(automation_AfterObjectChanged);}private void automation_AfterObjectChanged(object sender, AnnAfterObjectChangedEventArgs e){// print out a messagestring message;if (e.Objects != null && e.Objects.Count < 0)message = string.Format("Objects Count:" +"{0}, First object: {1}, Changed: {2}", e.Objects.Count, e.Objects[0].GetType().Name, e.ChangeType);elsemessage = String.Format("Changed: {0}", e.ChangeType);MessageBox.Show(message);}
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsImports Leadtools.Silverlight.Demos'using Leadtools.Help;Private Sub AnnAutomation_AfterObjectChanged(ByVal manager As AnnAutomationManager)' subscribe to the AfterObjectChanged event of all automationsFor Each automation As AnnAutomation In manager.AutomationsAddHandler automation.AfterObjectChanged, AddressOf automation_AfterObjectChangedNext automationEnd SubPrivate Sub automation_AfterObjectChanged(ByVal sender As Object, ByVal e As AnnAfterObjectChangedEventArgs)' print out a messageDim message As StringIf Not e.Objects Is Nothing AndAlso e.Objects.Count < 0 Thenmessage = String.Format("Objects Count: {0}, First object: {1}, Changed: {2}",e.Objects.Count, e.Objects(0).GetType().Name, e.ChangeType)Elsemessage = String.Format("Changed: {0}", e.ChangeType)End IfMessageBox.Show(message)End Sub
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
