Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic CurrentTime (Read 4453 times)
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
CurrentTime
Mar 2nd, 2017 at 12:57am
Print Post  
I set the calendar CurrentTime in a timer component on the page but it does not update the displayed current time lines (TimeTable view) until I click on the calendar. Is there a way to have it update on the display each time my timer updates the value?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: CurrentTime
Reply #1 - Mar 2nd, 2017 at 7:41am
Print Post  
Call Calendar.repaint.

Regards,
Meppy
  
Back to top
 
IP Logged
 
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: CurrentTime
Reply #2 - Mar 2nd, 2017 at 3:22pm
Print Post  
Hi Meppy,
Thank you again for the fast response. I could not find repaint but refresh works fine.

I also have a question - I am creating a production schedule and need to find free periods that meet the production run time requirement. I thought the Schedule.GetFreePeriod would work but it seems to only return the date not the date and start time of the free period. Is there a way to get the date and start time of a free period on a given date or later date?

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


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: CurrentTime
Reply #3 - Mar 2nd, 2017 at 3:34pm
Print Post  
Hi,

I was in error, referring to the Java version of the control. You should indeed use Calendar.Invalidate to refresh in .NET.

Schedule.GetFreePeriod should not return only dates. Are you sure your free period does not begin exactly at the start of a day? If this is not the case, can you save your schedule (by using Schedule.SaveTo, preferably in XML) and send it to me?

Regards,
Meppy
  
Back to top
 
IP Logged
 
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: CurrentTime
Reply #4 - Mar 2nd, 2017 at 9:03pm
Print Post  
Hi Meppy,
You were correct. The production schedule starts at 7AM, so I needed to set the start date/time for the production date (e.g. 03/07/2017 07:00) and it did indeed return the result I expected. I also see that if it can not find the needed free period it returns 01/01/0001. That works great!

Is there anyway to get the largest free period in a date/time range?

Thank you,
John
  
Back to top
 
IP Logged
 
Slavcho
God Member
*****
Offline


tech.support

Posts: 2466
Joined: Oct 19th, 2005
Re: CurrentTime
Reply #5 - Mar 3rd, 2017 at 11:46am
Print Post  
Hi,

The 01/01/0001 date returned when no period is found is DateTime.MinValue if you need to test against it. We'll add a GetLargestFreePeriod method next week.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: CurrentTime
Reply #6 - Mar 3rd, 2017 at 4:50pm
Print Post  
Great!

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


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: CurrentTime
Reply #7 - Mar 10th, 2017 at 9:03am
Print Post  
Hi,

Check out this build:

https://mindfusion.eu/_temp/MindFusion.Scheduling3.zip

It adds a new method - GetLargestFreePeriod - which will let you find the largest free interval in a specified time range.

Let me know if this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: CurrentTime
Reply #8 - Mar 17th, 2017 at 5:10pm
Print Post  
Hi Meppy,
Sorry for my late response. It turns out I really need to get all free periods on a give date so I wrote code to do that.

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