Appointments by x/y + Multiple Day Appointments

Feb 17, 2011 at 2:58 AM

Hi.

By chance i found what i see as an error. I have my dayview set up to show a complete week. I have entered som multiple day appointments into my list of appointments. When i changed week and entered another multiple day appointment it seemed to work just fine.

Now i tried to get the appointment by clicking on the dayview using the GetAppointmentAt method, i was presented with an appointment from another week, when i clicked om the day of the week, where the other appointment was entered.

Ex. In week 8, i have entered an appointment going from tuesday to thursday. In week 9 i entered an appointment from friday to sunday, leaving the area from monday to thursday blank, but when i click here, calling the GetAppointmentAt(e.X,.Y) i get the appointment from week 8.

I have found a solution to this by adding a couple of lines of code to the

ResolveAppointments(ResolveAppointmentsEventArgs args)

I have inserted so the code looks like this...

		protected virtual void ResolveAppointments(ResolveAppointmentsEventArgs args)
		{
			System.Diagnostics.Debug.WriteLine("Resolve app");
            longappointmentViews.Clear(); //First Line Inserted
            appointmentViews.Clear(); // Second Line Inserted

			if (OnResolveAppointments != null)
				OnResolveAppointments(this, args);

 

The longappointmentViews.Clear() and appointmentViews.Clear() take care of what seems to be a Dictionary that keep getting filled with appointments and not cleared even if the ResolveAppointment has a complete new set of appointments at each run, so the old ones should be cleared..

 

However, in entering theese multiple day appoinments, i have noticed that if an appointment starts tuesday and ends friday, the displayed appointment slot only shows from tuesday to thursday and does not include friday.. This is true for every multiple day appointment, that the last day of the appointment is not shown in the multipleday view area. Where can i change that, so that the shown appointment slot corresponds to the actual appointment length in days and does not stop a day short??

 

/Finn