Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Drag and Drop Objects to Screen (Fault tree Application)
 

Drag and Drop Objects to Screen (Fault tree Application)

Hi Everybody,

I want to create an application using vb.net to solve any fault tree. In my application, I want the user to interact with the screen by dragging fault tree symbols e.g.: (And gate, or gate, Fault, Basic Event, Undeveloped Event). This link has examples about how fault tree looks like

http://www.weibull.com/basics/fault-tree/index.htm

Now, after the user built the fault tree, I want to be able identify the ID of different elements on the screen and solve the fault tree.

I want to know how to start. How can I allow the user to drag and drop the fault tree elements to the screen?

Appreciate your help.

Mgawad  Friday, January 16, 2009 4:35 AM

Hi,

I don´t understand completely the question.


Do you need to develop a final user application or develop guidance application ?


If the response is the final user application, you can use third parts componentes, such as:

http://www.syncfusion.com/products/diagram/web/default.aspx
http://www.syncfusion.com/products/diagram/windows/default.aspx

http://www.nwoods.com/GO/dotnet.htm

http://www.ilog.com/products/diagramnet/index.cfm

These involve a typical application with winforms or webforms.
I think that you can create custom object diagram in these componentes.



But if you need to work over the Visual Studio IDE, in this case you have others alternatives.

You can use DSL Tools, to define the visual componentes, and use the VS IDE as designer.
If you need to restrict the use of the IDE, you can use the Visual Studio Isolate mode, and create a custom IDE for specific use.


Here you have some videos and samples about DSL:
http://msdn.microsoft.com/en-us/vsx/cc677256.aspx

Remember that DSL tools (Domain-Specific Language Tools) is a part of Visual Studio SDK:
http://msdn.microsoft.com/en-us/library/bb166441.aspx



I hope I have been helpful

greetings



Leandro Tuttini
Leandro Tuttini  Friday, January 16, 2009 11:03 PM
Hi tuttini,

Thanks for your reply

Let me clarify more about what I want to do.

I want to create an application that contains all Fault Tree icons like (And gate, or Gate, Fault event, Basic Event, �etc) . you can see who those icons on the drawing shown in this page

http://www.faulttree.org/

Now, once the user run the application, he can select any of the Fault tree icons, drag it, and drop it to another screen and built fault tree. The fault tree is not just used as a graphical representation. It has mathematical calculations which basically will differ according to the graph that the user will built using the Fault tree icons (And gate, or Gate, Fault event, Basic Event, �etc). So, the next step after the user built the fault tree, he can hit a button to do the calculations according to the shape he draws on screen.

I hope this clarify more what I am intended to do

Appreciate your support

Mgawad  Friday, January 16, 2009 11:28 PM

Hi,

I understand, you need to develop a final user application, a bussiness application, where the user composes the calculation graphically.

In this case the solution is the first alternative, use third component, and develop a standar application.

To develop the tree you only need to use the standar treeview control provided by the Visual Studio.
You can use it, and you can take image of shapes components and convert these to icons, then you can use this icons with the nodes in the tree view.

You can download the trial of Faultree application and take print paint of graphics components, to use in you treeview control as node icons.

You can develop the treeview with all shapes that you need in your application.
then you can develop the drag-drop event between the treeview control and thrird party graphic component, and draw the corresponding shape.

you can use the previous links, or you can use free componentes:

WinForm
http://dalssoft.com/diagram/default.aspx

WebForm (AJAX enable)
http://www.easydiagram.net/Home.aspx

I don´t know if you want to develop your application in winform or webform.
These two compoments are free and have limitations, if you want more control in the code you will need to use pay compomentes.
You can download trial version to study if it has all functionality that you need.
Third party components have extensal api and online demos that you can see, to learn how you need to use the component.

Remember that you can use the technical support to ask question about the compoment, and if it allows represent your shapes.


But, perhaps, you want to develop you own diagrams using GDI.
In this case remember that you can use a picture (or image) control, to draw inside it, and use the drag-drop event for this control, it is more simple to use the winform directly.
If you want more potencial, you can use WPF, it is more powerful in grahics aspects.


So far, you have only the graphics resolve, but you need to use it to calculate the mathematics formula.
Remember that this grahics compoments has a api to query about the representation in the control.
You can store the diagram in a database (the diagram generally is persisted in xml format), or you can query the diagram to discover the relations between shapes and calculate the formula.


I hope that help
greetings



Leandro Tuttini
Leandro Tuttini  Saturday, January 17, 2009 1:54 PM

ThanksLeandro

I will start in this direction and i will get back to youonce i have more questions

Mgawad  Saturday, January 17, 2009 5:54 PM
Hi,

this forum is just for GAX/GAT related questions, please post your question on the appropiate forum, maybe to vb.net forum.

jose.

Jose Escrich - weblogs.asp.net/jescrich
  • Proposed As Answer byJose Escrich Thursday, February 19, 2009 7:18 PM
  •  
Jose Escrich  Thursday, February 19, 2009 7:18 PM

Hello and a good day to the wholeTeam for a Good Job, and to a world class company in our time.

Mr Leandro,I read the very intersting solution you suggested to Mgawad, and I was hoping you cud assist me in my own adventure.

Im an undergrad from a university in London, studying Information system engr.,I have chosen to take up a rather challenging project which I can describes as:
AIM:

To develop a Computer Aided Software Engineering (CASE) tool for creating, training and simulating artificial neural networks (ANN).
First the usershould bewelcomed with a graphical interface with objects of an artificial neural network, as tools to enable the user to create or design an ANN. The objects which are components ofanANN are:

1. Dendrites (input)
2. Synapse (weight)
3. Nucleus (Activation Function)
4. Axon (output)

The GUIshould have a drag and drop function that will enable the user to designANN more easily. After putting together the NN, the user will be able to edit the network structure (architecture), by viewing layers of neurons, and editing the layer properties. The user will also be able to select a desired activation function for each neuron and assign initial weights for associated inputs.

A learning function will also be available, whereby a user can select a learning algorithm to implement for the designed NN. Here the user can adjust a learning algorithm parameter after selecting a particular algorithm to adopt. And finally, the user will have the option to perform newNN design, or save already designed NN.
Through my research, Istumbled on a solution which is that, the NN CASE tool will consists of a Simulator kernel, graphical user interface, and batch execution interface. The simulator kernel operates on the internal network data structures of the NNand performs all operations on them. The graphical user interface GUI, built on top of the kernel, gives a graphical representation of theNN and controls the kernel during the simulation run. In addition, the user interface can be used to directly create, manipulate and visualizeNN in various ways.
Truly not sure how to go about this, so I really need advise and directions to where i can get information on developing drag and drop GUI, found some c# libraries (source codes),which I can use through some CASE toolsI have researched on which include:
1. Stuttgart Neural Network Simulator,
2. Joone Editor,
and a few others, but not actually sure how to make the GUI have drag and drop functionality.
Wud gladdly appreciate any help or direction, or even a book that can make claer on the stepsI need to take.
Tanks and have a Blessed day,
Mansur M. Elakama
mansurMusa  Saturday, August 01, 2009 1:40 AM

You can use google to search for other answers

Custom Search

More Threads

• FileCodeModel null on none project file...
• List of available icons
• Problems with GAX/GAT February 2008 Final Release and WCSF 2.0
• Microsoft.Office.Interop.Excel.Applicatio not defined
• Exception: Unabe to et installer types in the C:\Program Files....\MetaGuidancePackageInstaller.dll assembly
• SCSF April 2008 - WPF Resource Dictionary implementation
• WCSF could not work after installing new version of GAT.
• Always publish release build
• installation problem in GAX
• Unable to load type System.Collections.Generic.Dictionary