Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to tell what resource I've dropped on (Read 1657 times)
pphart
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 1
Joined: Jul 29th, 2008
How to tell what resource I've dropped on
Jul 29th, 2008 at 8:11pm
Print Post  
I'm evaluating this product for a major project about to start.  We have equipment that we wish to schedule.  I've banged through pretty well and it looks like I've about got it but I've ran into a problem (most likly me).
Anyhow when we drop the process onto the resource, I need to calculate the total time that process is going to take depending on the resource and the process.  We have 16 resources and 32 different processes and each process runs differently dependent on the resource. 
I have the calendar set up using a resource view and have figured out how to keep from doubling up on using the resources.  But when I look at the dragdrop event I cannot tell which resource I am droping onto. 
I'm sure I've missed something any hints?


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


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: How to tell what resource I've dropped on
Reply #1 - Jul 30th, 2008 at 8:32am
Print Post  
Use the following technique in the DragDrop event handler in order to find the target resource:

Code
Select All
Point screenPoint = new Point(e.X, e.Y);
Point clientPoint = calendar1.PointToClient(screenPoint);

Resource resource = calendar1.GetResourceAt(clientPoint);
if (resource != null)
      MessageBox.Show(resource.Name);
else
      MessageBox.Show("<No resource>"); 


Regards,
Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint