0

Hi to all and thanks for reading this.. :) Im noob in wpf and want to create some sort of electronics schematics design software. Actually its more visual programming by blocks rather than electronics schematics software. here is the description what is needed:

imagine an object which has input output pins. in software pins must be defined as input or outputs.

objects are drag and drop able on canvas

possibility to draw wires between objects

when objects are connected to each other a specified C code must be generated on text box

do you have any idea how it can be accomplished ? tHANKS

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72

2 Answers2

1

Try out this excellent Code Project tutorial and example code on a WPF Diagram Designer. It provides a good foundation for doing other types of diagrams.

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
1

In a commercial scenario you can of course look at the (few) commercial general diagramming libraries out there.

E.g. one of the alternatives is the yFiles library. It has built-in support for first class port objects (pins in your nomenclature) and provides sophisticated edge routing algorithms so that whenever your user connects two pins the route in between the objects ("nodes") can be recalculated to minimize the number of crossings and bends. Of course there are a great number of events that you can register to when the user has done an edit (or even while the user is doing an edit to get a more direct feedback) that can be used to update the business objects, which in your case would mean generating the C code for the text box.

Full disclosure: I work for yWorks, however on Stackoverflow I do not represent my employer.

Sebastian
  • 7,729
  • 2
  • 37
  • 69
  • That seems like axactly what i need. But their price is too much exencive. Do you know any free libraries or products ? – Orxan Aliyev Nov 27 '12 at 13:36
  • I am not aware of a free library that has first-class port support. There are only a handful of libraries of that kind that are worth looking at and most of the time the commercial ones are worth their price tag, except for the trivial use-cases, where free alternatives may be sufficient. If the functionality of sukram's library (link in Dave's answer) suits your needs than that is an option, of course. – Sebastian Nov 27 '12 at 14:18