Samples does not work
I downloaded samples from
http://www.syncfusion.com/products/diagram/windows/Codesamples/default.aspx
Tried to use:
- InsertNodesCmd Sample
- LinkCmd Sample
- Determine Addition and Deletion of Node
- Determine the Addition and Deletion of Links
but hey don't work. Don't even compile.
I am using trial version and VS 2005 Pro (SP1)
http://www.syncfusion.com/products/diagram/windows/Codesamples/default.aspx
Tried to use:
- InsertNodesCmd Sample
- LinkCmd Sample
- Determine Addition and Deletion of Node
- Determine the Addition and Deletion of Links
but hey don't work. Don't even compile.
I am using trial version and VS 2005 Pro (SP1)
SIGN IN To post a reply.
3 Replies
AJ
Ajish
Syncfusion Team
August 27, 2007 11:08 PM UTC
Hi
Thank you for your patience. Hope the solution posted by us in your forum thread ( # 67558 ) helps in solving this issue. Please let us know if you need any further assistance.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=67558
Regards,
Ajish.
Thank you for your patience. Hope the solution posted by us in your forum thread ( # 67558 ) helps in solving this issue. Please let us know if you need any further assistance.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=67558
Regards,
Ajish.
KK
Krzysztof krzyzak
August 28, 2007 05:36 PM UTC
Hello,
I am very disappointed with this particular response.
I was asking for samples on the website which does not work and you quietly removed these samples from the website and referred me (foolishly) to another thread where I was asking for something completely different. It was so unprofessional conduct...
Regards,
Krzysztof
I am very disappointed with this particular response.
I was asking for samples on the website which does not work and you quietly removed these samples from the website and referred me (foolishly) to another thread where I was asking for something completely different. It was so unprofessional conduct...
Regards,
Krzysztof
AJ
Ajish
Syncfusion Team
August 28, 2007 06:35 PM UTC
Hi,
Thank you for your patience.
The Essential Diagram of V5.1 has been fully refactored to make the product more stable and maintainable. The sample available at the above link is for v4.4.0.51 samples. The other thread was referred since it discusses about a more similar issue.
Here is the more details regarding your query.
1) InsertNodesCmd Sample - Insert a node to the diagram
- The node to the diagram has to be added using the append child method. Here is the code for doing it,
>>>>>>>>>
Rectangle fromNode = new Rectangle(100, 100, 150, 100);
fromNode.Name = "Rectangle1";
fromNode.FillStyle.Type = FillStyleType.LinearGradient;
fromNode.FillStyle.ForeColor = Color.BlanchedAlmond;
fromNode.FillStyle.Color = Color.Orange;
fromNode.EditStyle.AllowSelect = true;
fromNode.LineStyle.LineWidth = 2;
fromNode.PinPoint = new PointF(100, 100);
this.diagram1.Model.AppendChild(fromNode);
>>>>>>>>>
2) LinkCmd Sample - Using Line connector to link different node
- The LineConnector class has to be used to connect two nodes. Here is the sample for doing it,
>>>>>>>>
LineConnector connector = new LineConnector(PointF.Empty, new PointF(20, 20));
connector.HeadDecorator.DecoratorShape = DecoratorShape.FilledFancyArrow;
connector.HeadDecorator.Size = new SizeF(12, 9);
connector.HeadDecorator.FillStyle.Color = Color.DarkGray;
connector.HeadDecorator.LineStyle.LineColor = Color.DarkGray;
connector.LineStyle.LineWidth = 2;
connector.LineStyle.LineColor = Color.DarkGray;
this.diagram1.Model.AppendChild(connector);
fromNode.CentralPort.TryConnect(connector.TailEndPoint);
toNode.CentralPort.TryConnect(connector.HeadEndPoint);
>>>>>>>>>
3) Determine Addition and Deletion of Node /Addition and Deletion of Links
- The addition and deletion of nodes can be handled using the NodeCollection changed event and determining the collection changed type in it. Here is the code for doing it,
>>>>>>>>>
this.diagram1.Model.EventSink.NodeCollectionChanged += new CollectionExEventHandler(EventSink_NodeCollectionChanged);
void EventSink_NodeCollectionChanged(CollectionExEventArgs evtArgs)
{
if (evtArgs.ChangeType == CollectionExChangeType.Insert)
{
Node node = evtArgs.Element as Node;
Console.WriteLine("Node name:"+ node.Name);
}
}
>>>>>>>>>
Here is a sample demonstrating all the above,
Sample: http://websamples.syncfusion.com/samples/Diagram.Windows/F67633/main.htm
Kindly take a look and let me know if you need any further assistance.
Regards,
Ajish.
Thank you for your patience.
The Essential Diagram of V5.1 has been fully refactored to make the product more stable and maintainable. The sample available at the above link is for v4.4.0.51 samples. The other thread was referred since it discusses about a more similar issue.
Here is the more details regarding your query.
1) InsertNodesCmd Sample - Insert a node to the diagram
- The node to the diagram has to be added using the append child method. Here is the code for doing it,
>>>>>>>>>
Rectangle fromNode = new Rectangle(100, 100, 150, 100);
fromNode.Name = "Rectangle1";
fromNode.FillStyle.Type = FillStyleType.LinearGradient;
fromNode.FillStyle.ForeColor = Color.BlanchedAlmond;
fromNode.FillStyle.Color = Color.Orange;
fromNode.EditStyle.AllowSelect = true;
fromNode.LineStyle.LineWidth = 2;
fromNode.PinPoint = new PointF(100, 100);
this.diagram1.Model.AppendChild(fromNode);
>>>>>>>>>
2) LinkCmd Sample - Using Line connector to link different node
- The LineConnector class has to be used to connect two nodes. Here is the sample for doing it,
>>>>>>>>
LineConnector connector = new LineConnector(PointF.Empty, new PointF(20, 20));
connector.HeadDecorator.DecoratorShape = DecoratorShape.FilledFancyArrow;
connector.HeadDecorator.Size = new SizeF(12, 9);
connector.HeadDecorator.FillStyle.Color = Color.DarkGray;
connector.HeadDecorator.LineStyle.LineColor = Color.DarkGray;
connector.LineStyle.LineWidth = 2;
connector.LineStyle.LineColor = Color.DarkGray;
this.diagram1.Model.AppendChild(connector);
fromNode.CentralPort.TryConnect(connector.TailEndPoint);
toNode.CentralPort.TryConnect(connector.HeadEndPoint);
>>>>>>>>>
3) Determine Addition and Deletion of Node /Addition and Deletion of Links
- The addition and deletion of nodes can be handled using the NodeCollection changed event and determining the collection changed type in it. Here is the code for doing it,
>>>>>>>>>
this.diagram1.Model.EventSink.NodeCollectionChanged += new CollectionExEventHandler(EventSink_NodeCollectionChanged);
void EventSink_NodeCollectionChanged(CollectionExEventArgs evtArgs)
{
if (evtArgs.ChangeType == CollectionExChangeType.Insert)
{
Node node = evtArgs.Element as Node;
Console.WriteLine("Node name:"+ node.Name);
}
}
>>>>>>>>>
Here is a sample demonstrating all the above,
Sample: http://websamples.syncfusion.com/samples/Diagram.Windows/F67633/main.htm
Kindly take a look and let me know if you need any further assistance.
Regards,
Ajish.
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
KK Krzysztof krzyzak
- Aug 25, 2007 01:51 PM UTC
- Aug 28, 2007 06:35 PM UTC