Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Prevent cycles (Read 5723 times)
SJasinski
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Aug 12th, 2005
Prevent cycles
Sep 13th, 2005 at 1:59pm
Print Post  
I am porting our product from lasal's addflow to your component. Now there's only one thing I can't find how to do with flowchart.net, namely preventing users from drawing cycles in the diagram. That's done by setting one property in lasal's control, can you suggest how to do it with yours or can you add such a feature, please ?

thank you
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Prevent cycles
Reply #1 - Sep 14th, 2005 at 10:33am
Print Post  
Hi,

Try using the PathFinder.FindCycle from the ArrowCreating event. If there is a cycle found, do not allow the arrow to be created, i.e. set eargs.Confirm = false.

Stoyan
  
Back to top
 
IP Logged
 
SJasinski
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Aug 12th, 2005
Re: Prevent cycles
Reply #2 - Sep 14th, 2005 at 1:00pm
Print Post  
Nope that doesn't work. it seems the cycle is not there yet when that event is raised... any other suggestions please ?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Prevent cycles
Reply #3 - Sep 14th, 2005 at 1:50pm
Print Post  
Oh, try this:
Handle ArrowCreating, if there is path going from the new arrow's Destination to its Origin, then adding that arrow would produce a cycle. So use PathFinder.FindShortestPath(dest, origin) and if there's one found set the event arg Confirm = false.
  
Back to top
 
IP Logged
 
SJasinski
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Aug 12th, 2005
Re: Prevent cycles
Reply #4 - Sep 14th, 2005 at 2:25pm
Print Post  
Great thanks, I should have thought of this myself  Grin
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint