Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Timetable -> disable collision-> appointment (Read 2707 times)
quaint
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Jan 11th, 2008
Timetable -> disable collision-> appointment
Jun 5th, 2008 at 8:51am
Print Post  
Hi,

Can I influence the appointment ordering in timetable mode when I disable collisions?

For example:
I have different kinds of appointments, all with a unique priority. I would like to only display the top-priority appointment when two appointments overlap.

Sincerely,
Paul van Iterson
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Timetable -> disable collision-> appoint
Reply #1 - Jun 5th, 2008 at 10:59am
Print Post  
There is no built-in way to achieve this. You can however manually check for overlapping appointments and set the Visible property of those with lower priority to false in order to hide them.

Meppy
  
Back to top
 
IP Logged
 
quaint
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Jan 11th, 2008
Re: Timetable -> disable collision-> appoint
Reply #2 - Jun 5th, 2008 at 11:06am
Print Post  
Thanks, but I need a bit more sofistication than that..

   ++++++
*****

should result in:
**++++++

So like an aggregation.... I'll work out alternative methods then! Unless you have some more suggestions?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Timetable -> disable collision-> appoint
Reply #3 - Jun 5th, 2008 at 12:33pm
Print Post  
Here is a method that can help you achieve the desired functionality:

Code
Select All
private void UpdateVisibility()
{
	calendar1.BeginInit();

	foreach (Item item in calendar1.Schedule.Items)
		item.Visible = true;

	foreach (Item item in calendar1.Schedule.Items)
	{
		ItemCollection items = calendar1.Schedule.GetAllItems(
			item.StartTime, item.EndTime);

		if (items.Count > 1)
		{
			foreach (Item a in items)
			{
				if (a == item)
					continue;
				if (!a.Visible)
					continue;

				if (a.Priority > item.Priority)
					item.Visible = false;

				if (a.Priority < item.Priority)
					a.Visible = false;
			}
		}
	}

	calendar1.EndInit();
} 


Invoke this method in the ItemCreated, ItemModified and ItemDeleted event handlers in order to update the visibility of the overlapping items.

Meppy
  
Back to top
 
IP Logged
 
quaint
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Jan 11th, 2008
Re: Timetable -> disable collision-> appoint
Reply #4 - Jun 6th, 2008 at 7:15am
Print Post  
Nice, neat function!

However still doesn't totally match my needs, but is a good starting point though!

What I need is a way to make underlying items (with less priority) PARTIALLY invisible (i.e. only the part that is actually below an overlapping higher-prio item). So that part that isn't overlapped should still be visible!

Thanks tho, this is a good starting point for me! Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint