Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic help me! (Read 1563 times)
jike
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: May 4th, 2010
help me!
May 4th, 2010 at 3:14am
Print Post  
Create two ShapeNode, A ShapeNode and B ShapeNode when you click, you would like to Link between the two. Coding and I want to direct, explains a lot of difficulty or, Link to us would appreciate to Coding.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: help me!
Reply #1 - May 4th, 2010 at 4:01am
Print Post  
If you are asking how to create items by clicking on the diagram, it could look like this:

Code
Select All
private void diagram_Clicked(object sender, DiagramEventArgs e)
{
	Size nodeSize = new Size(60, 40);
	Point p = new Point(
		e.MousePosition.X - nodeSize.Width / 2,
		e.MousePosition.Y - nodeSize.Height / 2);
	diagram.Factory.CreateShapeNode(p, nodeSize);

	int nc = diagram.Nodes.Count;
	if (nc > 1)
		diagram.Factory.CreateDiagramLink(diagram.Nodes[nc - 2], diagram.Nodes[nc - 1]);
} 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
jike
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: May 4th, 2010
Re: help me!
Reply #2 - May 4th, 2010 at 4:58am
Print Post  
thank you, Stoyan !!

i did Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint