Leadtools.Windows.Annotations Namespace > AnnAutomation Class : AfterObjectChanged Event |
public event EventHandler<AnnAfterObjectChangedEventArgs> AfterObjectChanged
'Declaration Public Event AfterObjectChanged As EventHandler(Of AnnAfterObjectChangedEventArgs)
'Usage Dim instance As AnnAutomation Dim handler As EventHandler(Of AnnAfterObjectChangedEventArgs) AddHandler instance.AfterObjectChanged, handler
public event EventHandler<AnnAfterObjectChangedEventArgs> AfterObjectChanged
add_AfterObjectChanged(function(sender, e)) remove_AfterObjectChanged(function(sender, e))
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. |
Private Sub AnnAutomation_AfterObjectChanged(ByVal manager As AnnAutomationManager) ' subscribe to the AfterObjectChanged event of all automations For Each automation As AnnAutomation In manager.Automations AddHandler automation.AfterObjectChanged, AddressOf automation_AfterObjectChanged Next automation End Sub Private Sub automation_AfterObjectChanged(ByVal sender As Object, ByVal e As AnnAfterObjectChangedEventArgs) ' print out a message Dim message As String If Not e.Objects Is Nothing AndAlso e.Objects.Count < 0 Then message = String.Format("Objects Count: {0}, First object: {1}, Changed: {2}", _ e.Objects.Count, e.Objects(0).GetType().Name, e.ChangeType) Else message = String.Format("Changed: {0}", e.ChangeType) End If MessageBox.Show(message) End Sub
private void AnnAutomation_AfterObjectChanged(AnnAutomationManager manager) { // subscribe to the AfterObjectChanged event of all automations foreach(AnnAutomation automation in manager.Automations) automation.AfterObjectChanged += new EventHandler<AnnAfterObjectChangedEventArgs>(automation_AfterObjectChanged); } private void automation_AfterObjectChanged(object sender, AnnAfterObjectChangedEventArgs e) { // print out a message string 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); else message = String.Format("Changed: {0}", e.ChangeType); MessageBox.Show(message); }
private void AnnAutomation_AfterObjectChanged(AnnAutomationManager manager) { // subscribe to the AfterObjectChanged event of all automations foreach(AnnAutomation automation in manager.Automations) automation.AfterObjectChanged += new EventHandler<AnnAfterObjectChangedEventArgs>(automation_AfterObjectChanged); } private void automation_AfterObjectChanged(object sender, AnnAfterObjectChangedEventArgs e) { // print out a message string 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); else message = String.Format("Changed: {0}", e.ChangeType); MessageBox.Show(message); }
Private Sub AnnAutomation_AfterObjectChanged(ByVal manager As AnnAutomationManager) ' subscribe to the AfterObjectChanged event of all automations For Each automation As AnnAutomation In manager.Automations AddHandler automation.AfterObjectChanged, AddressOf automation_AfterObjectChanged Next automation End Sub Private Sub automation_AfterObjectChanged(ByVal sender As Object, ByVal e As AnnAfterObjectChangedEventArgs) ' print out a message Dim message As String If Not e.Objects Is Nothing AndAlso e.Objects.Count < 0 Then message = String.Format("Objects Count: {0}, First object: {1}, Changed: {2}", e.Objects.Count, e.Objects(0).GetType().Name, e.ChangeType) Else message = String.Format("Changed: {0}", e.ChangeType) End If MessageBox.Show(message) End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2