I'm working creating my own custom schedule item class like in the tutorial 4, so let me use the tutorial to expain my question.
The property _kept is initialized TRUE in the constructor.
So using the code below(change Kept to false), everytime the user clicks the appointment the message text is showing:
This is our item!. Kept is True.
when the value for Kept must be false.
If I remove the recurrent part of the code the value will be false as expected but for recurrent appointments probably I'm missing something in the code.
Thanks in advance for any help.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Schedule.RegisterItemClass(GetType(MyApp), "myapp", 1)
calendar.InteractiveItemType = GetType(MyApp)
'added by gerardo
Dim newapp As MyApp newapp = New MyApp newapp.DescriptionText = "TEst 01" newapp.HeaderText = "header 01" newapp.Kept = False newapp.StartTime = New DateTime(2007, 2, 5, 8, 0, 0) newapp.EndTime = New DateTime(2007, 2, 5, 10, 30, 0)
Dim rec As Recurrence = New Recurrence rec.Pattern = RecurrencePattern.Daily rec.StartDate = New DateTime(2007, 1, 10)
rec.RecurrenceEnd = RecurrenceEnd.Never
newapp.Recurrence = rec
calendar.Schedule.Items.Add(newapp) calendar.Date = New Date(2007, 2, 5)
End Sub
Private Sub calendar_ItemClick(ByVal sender As Object, ByVal e As MindFusion.Scheduling.WinForms.ItemMouseEventArgs) Handles calendar.ItemClick
If TypeOf e.Item Is MyApp Then Dim myAppointment As MyApp myAppointment = e.Item calendar.ResetDrag() MessageBox.Show("This is our item!. Kept is " + myAppointment.Kept.ToString())
End If
|