Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Guru advice please? (Read 3007 times)
elpuerco
Junior Member
**
Offline


Time?  What's time matta
to a pig?

Posts: 94
Joined: Oct 2nd, 2007
Guru advice please?
Feb 3rd, 2008 at 3:04pm
Print Post  
Hi Meppy & Stoyan, may I pick your brains please on how best to deal with this bit of my application?

Following you help on with my recurrence problems I now have my app using the inbuilt appointment and recurrence forms and have changed it so I now make changes to the app.config file and leave the registry alone!   Wink

From a previous post I asked about being able to identify recurrences so I could update the highlighting on the monthview.

All appointments are set on the timetableview calendar.   When any are added or deleted the matching date on the monthview calendar has its highlight set to yellow to signal an appoiment on that date.

As the recurrences are temporary you said I could query the schedule.getallitems method.

However this method requires a date range.

My question is this:

Should I call this method with a start and end date so huge it gets all items from the birth of Christ until the end of mankind or only for the 4 months on current view on the monthview calendar?

Is it better to call this method each time the date range on the monthview changes?

thanks.

BTW when you kindly looked at my app (and cringed I'm sure) you mentioned some bindings that were stopping debugging assemblies from being loaded?

Is this something I need to address here so I get more control over debugging my apps?

Thanks ...















  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Guru advice please?
Reply #1 - Feb 4th, 2008 at 6:07am
Print Post  
Quote:
Should I call this method with a start and end date so huge it gets all items from the birth of Christ until the end of mankind or only for the 4 months on current view on the monthview calendar?

No. If you have infinite recurrences, such operation might take extremely long.

Quote:
Is it better to call this method each time the date range on the monthview changes?

This is the preferred solution. Just regenerate all items in the corresponding range of 4 months every time this range changes or a new recurrence is created.

Quote:
Is this something I need to address here so I get more control over debugging my apps?

No, it just prevented your project from loading our own debug dlls. It might cause problems for you in the future if you start using newer version of Planner.NET however.

Hope this helps.

Meppy
  
Back to top
 
IP Logged
 
elpuerco
Junior Member
**
Offline


Time?  What's time matta
to a pig?

Posts: 94
Joined: Oct 2nd, 2007
Re: Guru advice please?
Reply #2 - Feb 4th, 2008 at 8:27am
Print Post  
Meppy wrote on Feb 4th, 2008 at 6:07am:
No, it just prevented your project from loading our own debug dlls. It might cause problems for you in the future if you start using newer version of Planner.NET however.
Meppy


Thanks Meppy, I will take your advice.

Re the possible future problems what exactly was it in my app that caused you problems and me maybe in the future?

Better to address it now!

Thanks
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Guru advice please?
Reply #3 - Feb 4th, 2008 at 11:21am
Print Post  
It was in the .config file as long as I recall. Just look for a "3.1." in there and remove any static references to a specific version of Calendar.dll.

Meppy
  
Back to top
 
IP Logged
 
elpuerco
Junior Member
**
Offline


Time?  What's time matta
to a pig?

Posts: 94
Joined: Oct 2nd, 2007
Re: Guru advice please?
Reply #4 - Feb 4th, 2008 at 12:20pm
Print Post  
Meppy wrote on Feb 4th, 2008 at 6:07am:

This is the preferred solution. Just regenerate all items in the corresponding range of 4 months every time this range changes or a new recurrence is created.
Meppy


I have entered code in the VisibleDateChanged event of my month view calender to track the 4 months being displayed

I see I can get the previous and new visible dates but they range from the actual current date rather than the 1st and end of month for example:

01/02/2008 - 30/05/2008

I use this

e.NewDate.AddDays(-e.NewDate.Day + 1)

but find this to be messy and to do something similar to get the end day of the 4th month seems even messier!

Any tips?

Thanks
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Guru advice please?
Reply #5 - Feb 4th, 2008 at 12:51pm
Print Post  
Have you tried calling the GetFirstVisibleDate and GetLastVisibleDate methods of the Calendar class? Anyway calculating the first and last days in the visible range isn't that messy.

Meppy
  
Back to top
 
IP Logged
 
elpuerco
Junior Member
**
Offline


Time?  What's time matta
to a pig?

Posts: 94
Joined: Oct 2nd, 2007
Re: Guru advice please?
Reply #6 - Feb 4th, 2008 at 1:22pm
Print Post  
OK I will stick with the calculating method.  I had already tried the GetFirstVisible date etc but these return the dates prior to the caladar being updated?

The e.newdate and e.previousdate are the ones that report the near right info :0

Thanks
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint