This commit is contained in:
JenneJ
2016-05-18 16:45:19 +02:00
parent fc54eae3ab
commit 7b3db6f990
4 changed files with 64 additions and 13 deletions

View File

@@ -59,11 +59,17 @@ Public Class ClassControlBuilder
' ==================================================================================
' Handler für alle Controls
' ==================================================================================
Public ControlsChanged As New List(Of Integer)
Public Sub RecordChanged(sender As Object, ByVal e As EventArgs)
Dim onRecordChangedHandler As EventHandler = CType(Me.Events(_onRecordChangedName), EventHandler)
Dim ctrl As Control = DirectCast(sender, Control)
Dim controlId As Integer = DirectCast(ctrl.Tag, ClassControlMetadata).Id
If Not ControlsChanged.Contains(controlId) Then
ControlsChanged.Add(controlId)
End If
If (onRecordChangedHandler IsNot Nothing And WatchRecordChanges) Then
Console.WriteLine("RecordChanged")
onRecordChangedHandler.Invoke(sender, e)
End If
End Sub
@@ -71,8 +77,13 @@ Public Class ClassControlBuilder
' CheckedListBox hat andere Handler Signatur
Public Sub RecordChanged(sender As Object, ByVal e As DevExpress.XtraEditors.Controls.ItemCheckEventArgs)
Dim onRecordChangedHandler As EventHandler = CType(Me.Events(_onRecordChangedName), EventHandler)
Dim ctrl As Control = DirectCast(sender, Control)
Dim controlId As Integer = DirectCast(ctrl.Tag, ClassControlMetadata).Id
If Not ControlsChanged.Contains(controlId) Then
ControlsChanged.Add(controlId)
End If
If (onRecordChangedHandler IsNot Nothing) Then
If (onRecordChangedHandler IsNot Nothing And WatchRecordChanges) Then
onRecordChangedHandler.Invoke(sender, e)
End If
End Sub