C# 生成动态流程图
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1710642/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Generate dynamic flow-chart
提问by WowtaH
We are looking for some code/component that can create a flow-chart (image) dynamically, preferably in .NET/C# (although a Silverlight/Flash-component that takes a XML/JSON-feed will also be fine).
我们正在寻找一些可以动态创建流程图(图像)的代码/组件,最好是在 .NET/C# 中(尽管采用 XML/JSON-feed 的 Silverlight/Flash 组件也可以)。
For example we have a (business) quote that goes through te following steps before it becomes final:
例如,我们有一个(商业)报价,它在成为最终报价之前经过以下步骤:
Requested -> Pending -> Ready for revision -> Under revision -> Final
已申请 -> 待定 -> 准备修订 -> 正在修订 -> 最终
And as an extra step there is the possibility to go from 'Under revision' back to 'Pending'.
作为一个额外的步骤,有可能从“正在修订”回到“待定”。
So the component/code should draw something like this (where 'Under revision' would be the active status for this quote):
所以组件/代码应该画这样的东西(其中“正在修订”将是此报价的活动状态):
Example chart http://www.wowtah.nl/flowchart-example.gifThe reason that we are not just creating static GIF-images (and load the correct one on demand) is that these steps can vary per customer implementation of our product. So we're looking for a way of dynamically show the user the workflow steps that are configured for them.
示例图表 http://www.wowtah.nl/flowchart-example.gif我们不只是创建静态 GIF 图像(并按需加载正确的图像)的原因是这些步骤可能因我们产品的客户实施而异. 因此,我们正在寻找一种向用户动态显示为其配置的工作流程步骤的方法。
Any help would be greatly appreciated!
任何帮助将不胜感激!
回答by Kyle Trauberman
MindFusion looks like they have some good diagramming controls that may work for you:
MindFusion 看起来他们有一些很好的图表控件,可能对你有用:
回答by Tim Ridgely
I built a workflow solution a while back and evaluated a number of diagramming controls, including the MindFusion control. I settled on the Syncfusion diagram control, primarily for its ease of use for an end user (especially when drawing connections).
不久前我构建了一个工作流解决方案并评估了许多图表控件,包括 MindFusion 控件。我选择了 Syncfusion 图控件,主要是因为它易于最终用户使用(尤其是在绘制连接时)。
I'm using the WPF edition, but they make editions for ASP.Net and WinForms. It has methods for exporting to images.
我使用的是 WPF 版本,但他们为 ASP.Net 和 WinForms 制作了版本。它具有导出到图像的方法。
These are some of the components that I can remember evaluating; I'd recommend giving them a shot and seeing which you like best.
这些是我记得评估过的一些组件;我建议给他们一个机会,看看你最喜欢哪一个。
回答by Kit Fisto
In the meantime there are also open source diagramming libraries that you can find on Codeplex and Google code.
同时,您还可以在 Codeplex 和 Google 代码上找到开源图表库。
A very deep one with many features and very flexible is
一个具有许多功能且非常灵活的非常深的
Perhaps easier to program but more limited in scope
也许更容易编程,但范围更有限