Imports System.Collections.Generic
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports System.Diagnostics
AddHandler Me.dayView.AppointmentsDragDrop, AddressOf OnAppointmentsDragDrop
Private Sub OnAppointmentsDragDrop(ByVal sender As Object, ByVal e As AppointmentsDragDropEventArgs)
If Not (e.NewOwner Is e.InitialOwner) Then
Dim scheduleControl As UltraScheduleControlBase = sender
Dim changeHistory As List(Of AppointmentOwnershipChangeHistoryItem) = scheduleControl.Tag
If changeHistory Is Nothing Then
changeHistory = New List(Of AppointmentOwnershipChangeHistoryItem)
End If
changeHistory.Add(New AppointmentOwnershipChangeHistoryItem(DateTime.Now, e.InitialOwner, e.NewOwner, e.Appointments, e.HasCopies))
scheduleControl.Tag = changeHistory
End If
End Sub
Public Structure AppointmentOwnershipChangeHistoryItem
Public timeStamp As DateTime
Public copied As Boolean
Public initialOwner As Owner
Public newOwner As Owner
Public appointments As ReadOnlyAppointmentsCollection
Public Sub New(ByVal timeStamp As DateTime, ByVal initialOwner As Owner, ByVal newOwner As Owner, ByVal appointments As ReadOnlyAppointmentsCollection, ByVal copied As Boolean)
Me.timeStamp = timeStamp
Me.initialOwner = initialOwner
Me.newOwner = newOwner
Me.appointments = appointments
Me.copied = copied
End Sub
End Structure