We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Essential Diagramm Tutorial

hi,

Ich just installed the Studio Test Version.
I got some problems with the windows forms tutorial.

my problem is: your tutorial doesn't run.
the second point of the tutorial: 'handling diagram events' a lots of errors. some are easily fixably by implementing "using Syncfusion.Windows."... an so on. there are other very simple errows in the event handles ('=' instead of '+=')

summary: there are no discribing words what to do.

and the best thing of all? just starting the sample project for the tutorial.
what happend? doesn't run because of errors...


you should redesign your tutorial (for peole who haven't work with essential before)

thanks

7 Replies

MB Mathias Buchholz May 7, 2007 12:12 PM UTC

annotation:

I realized to run the sample.
(after implementing some code)


--> I miss some code in your example I found as written in the tutorial...


J. J.Nagarajan Syncfusion Team May 7, 2007 06:56 PM UTC

Hi Mathias,

Sorry for the inconvenience caused.

Could you please check the following Syncfusion assemblies are added in Reference node (in Solution Explorer bar)

1. syncfusion.core.dll
2.syncfusion.diagram.base.dll
3.Syncfusion.Diagram.Windows.dll
4.syncfusion.shared.base.dll
5.syncfusion.shared.windows.dll

If the above assemblies are not added in Reference node please do the following

1. Remove all syncfusion assemblies from the reference node
2. Add the above assemblies from the public assemblies folder(C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\PublicAssemblies)
3. Check "Copy Local" property of all syncfusion assemblies to false.
4.Check all syncfusion assemblies are pointing to your installed version(e.g v.4.4.0.51).

It would be very helpful to us, if you could give some screen shot showing this error. Also let me know your Studio Test Version.

Thanks,
Nagaraj


MB Mathias Buchholz May 8, 2007 07:37 AM UTC

hi,

thanks for fast answer:

the assemblies are added.
but it seems I got to write additional code
(using 'packages' using 'namespace')

in the tutorial, this code cause an error:
this.diagram1.Model.ChildrenChangeComplete = new Syncfusion.Windows.Forms.Diagram.NodeCollectionEventHandler(Model_ChildrenChangeComplete);
(ms-help://Syncfusion/SfDiagramWindows/Handling.html)
'=' --> '+='

another I don't understand:
at that page below:

// Event handler for the Diagram.Model.ChilderenChangeComplete event.

private void Model_ChildrenChangeComplete(object sender, Syncfusion.Windows.Forms.Diagram.NodeCollectionEventArgs evtArgs)

{

// Update label1 depending on whether a shape is

// added or deleted from the Diagram.


if(evtArgs.ChangeType == CollectionExChangeType.Insert)

{

this.label1.ForeColor = Color.Blue;

this.label1.Text = "Last Node Added: " evtArgs.Node.Name.ToString();

-->nowhere is the other side described
(the thing where .label1. ist implemented)


I understand a tutorial as a step-by-step 'HowTo'
(how to begin)
the test version: 4.4.0.51
your software seems to be where powerful but also very complex. so some detailed hints for first steps would be useful.

thanks




J. J.Nagarajan Syncfusion Team May 8, 2007 08:51 PM UTC

Hi Mathias,

Sorry for the inconvenience caused.

If you want to trigger Model.ChildrenChangeComplete event then please refer to the following code snippet

this.diagram1.Model.ChildrenChangeComplete += new Syncfusion.Windows.Forms.Diagram.NodeCollectionEventHandler(this.diagram1_Model_ChildrenChangeComplete);

private void diagram1_Model_ChildrenChangeComplete(object sender, Syncfusion.Windows.Forms.Diagram.NodeCollectionEventArgs evtArgs)
{
if(evtArgs.ChangeType==CollectionExChangeType.Insert)
{
Symbol symbol=evtArgs.Node as Symbol;
this.label1.Text=symbol.Name;
this.label1.ForeColor=Color.Green;
}
if(evtArgs.ChangeType==CollectionExChangeType.Remove)
{
Symbol symbol=evtArgs.Node as Symbol;
this.label2.Text=symbol.Name;
this.label2.ForeColor=Color.Orange;
}
}

I have attached the sample for your reference. In this sample when you add the symbol to the diagram you can get the added symbol's name in Label1. When you remove the symbol from the diagram its name gets displayed in label2.

You can download the sample from the following page.

http://websamples.syncfusion.com/samples/Diagram.Windows/F60499/main.htm


Please refer to the sample and let me know if you have any questions.

Thanks,
Nagaraj


MB Mathias Buchholz May 10, 2007 09:40 AM UTC

Thanks,

I seems the support is excellent:)


MB Mathias Buchholz May 16, 2007 02:45 PM UTC

hello,

thanks for zour hints.

why are so many pages at the online help empty?
(the final from 2 days ago)

empty tutorial, empty samples (essential diagram)

I mean, I realized drawing nodes, wow.

but how to connect? (with the designer)


MF Meera Fathima Syncfusion Team May 17, 2007 12:55 PM UTC


Hello Mathias,

If you want to connect two symbols , you can do by using the Diagram.ActivateTool("LinkTool") method. Here the "LinkTool" is used to draw links between two symbols at runtime. Please refer the Diagram Samples/QuickStart/Quick Start sample's menuItemToolsLink_Click(..) method to get an idea about this.

Or if you want to create links/connect symbols programmatically, you can use the following method.

Sample C# code snippet :

//// Use the InsertNodesCmd to insert the two symbols into the diagram
InsertNodesCmd inscmd = new InsertNodesCmd();
MySymbol symbol1 = new MySymbol();
symbol1.Bounds = new RectangleF(10, 10, symbol1.Width, symbol1.Height);
inscmd.Nodes.Add(symbol1);

MySymbol symbol2 = new MySymbol();
symbol2.Bounds = new RectangleF(200, 200, symbol2.Width, symbol2.Height);
inscmd.Nodes.Add(symbol2);

this.diagram.Controller.ExecuteCommand(inscmd);

// Use the LinkCmd to connect the two symbols using a simple Line link
LinkCmd newlink = new LinkCmd();
newlink.Link = new Link(Syncfusion.Windows.Forms.Diagram.Link.Shapes.Line);
newlink.Link.EndPoints.LastEndPointDecorator = Global.EndPointDecoratorPalette["Filled Arrow"].CreateInstance();
newlink.SourcePort = symbol1.CenterPort;
newlink.TargetPort = symbol2.CenterPort;
this.diagram.Controller.ExecuteCommand(newlink);

Please see the Diagram Samples/Symbol Design/Dynamic Symbol sample's toolBar1_ButtonClick() method that shows the above mentioned details.

Dont hesitate to update us if you have any more queries. We will be glad to assist you.

Thanks,
Meera.

Loader.
Live Chat Icon For mobile
Up arrow icon