Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Find a existing box (Read 4260 times)
lemon
YaBB Newbies
*
Offline



Posts: 28
Joined: Aug 31st, 2005
Find a existing box
Sep 2nd, 2005 at 9:56am
Print Post  
Hi,

I create a flow chart from data base with this commands:

MindFusion.FlowChartX.Commands.AddItemCmd cmd =
new MindFusion.FlowChartX.Commands.AddItemCmd(Child);

and if I have all nodes:
cmd.Execute();

during create:
if I take a new node from data base I have to check if the node already exists, because I otherwise have doubled nodes. Where and how can I check which nodes exists already

thx for support
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Find a existing box
Reply #1 - Sep 2nd, 2005 at 12:25pm
Print Post  
Hi,

Better use a

flowchart.Add(Child)

method call instead of creating a command. 'Add' will check whether the node already exists in the diagram, and if it does not, an AddItem command will be created and executed.

Anyway if you need to know whether a box exists in the diagram, you could use an

if (flowchart.Boxes.Contains(box))
  ....

statement to determine that.

I hope that helps.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Find a existing box
Reply #2 - Sep 2nd, 2005 at 12:30pm
Print Post  
Oh, and it seems that was a FlowChart.NET related question again. Please post your next questions in the FlowChart.NET board (this one is for the ActiveX version of the control).

Thanks!
  
Back to top
 
IP Logged
 
lemon
YaBB Newbies
*
Offline



Posts: 28
Joined: Aug 31st, 2005
Re: Find a existing box
Reply #3 - Sep 2nd, 2005 at 12:52pm
Print Post  
Sorry, I will never post here again Smiley

and thx for your quite good help.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint