如何在.NET中构建图表应用程序?

时间:2021-06-07 07:30:29

I want to write a GUI seating application that allows users to draw and annotate simple "maps" of seating areas.

我想编写一个GUI座位应用程序,允许用户绘制和注释座位区域的简单“地图”。

The end result would probably look something a little like Visio, but specifically for manipulating my "seating" data model rather than producing files.

最终结果可能看起来有点像Visio,但专门用于操纵我的“座位”数据模型而不是生成文件。

In Java-land, there's the Graphical Editing Framework (GEF) -- is there anything like this in the .NET space? Should I just use System.Drawing.Drawing2D primitives and handle it all myself?

在Java-land中,有图形编辑框架(GEF) - 在.NET领域有这样的东西吗?我应该只使用System.Drawing.Drawing2D原语并自己处理它吗?

5 个解决方案

#1


Here is product from Nevron. It is paid but doing it all yourself will take lot of time and effort.

这是来自Nevron的产品。这是付出的,但自己做这一切将花费大量的时间和精力。

Open Diagram and EasyDiagram.net are available at Codeplex. Be sure to download and look into their code.

Codeplex提供Open Diagram和EasyDiagram.net。请务必下载并查看他们的代码。

#2


There is Netron Library for diagramming. It is open source and uses GDI+.

有用于图表的Netron库。它是开源的,使用GDI +。

#3


Check out NShape. It is an open source diagramming framework written in C# and quite powerful. Its controls are WinForms controls but you can also use it for WPF.

看看NShape。它是一个用C#编写的开源图表框架,非常强大。它的控件是WinForms控件,但您也可以将它用于WPF。

#4


You might consider using the DSL Toolkit from the Visual Studio SDK. It allows you to create a graphical DSL designer by first creating a domain model, and then creating the graphical notation that will allow users to create or edit instances of that model.

您可以考虑使用Visual Studio SDK中的DSL Toolkit。它允许您通过首先创建域模型,然后创建允许用户创建或编辑该模型实例的图形表示法来创建图形DSL设计器。

You may very well be able to create a graphical notation that looks like a seating area. This would allow your users to not only "diagram", but to produce a file containing a filled-in domain model of what was diagrammed.

您很可能能够创建一个看起来像座位区域的图形符号。这将使您的用户不仅可以“图表”,而且可以生成包含图表内容的填充域模型的文件。

#5


Check out our MetaDraw component - www.MetaDraw.com MetaDraw is designed to make applications like this easy. MetaDraw will support a background image and an annotation layer You can put users into a variety of editing modes - Lines, Curves, Text, Shapes, etc. Every drawn element is distinct - just like in Visio, so you can allow users to select objects and move them around or resize them. Every object can have multiple hidden tags ( like seat numbers or database record pointers ). You can recognize which objects users select ( for instance take some action when user clicks seat 22 ) . You can dynamically modify propertie by code - such as searching for seat 22 and changing it's fill color. Of course you can also scroll, zoom, print, save to a variety of formats and more.

查看我们的MetaDraw组件 - www.MetaDraw.com MetaDraw旨在使这样的应用程序变得简单。 MetaDraw将支持背景图像和注释图层您可以将用户置于各种编辑模式 - 线条,曲线,文本,形状等。每个绘制的元素都是不同的 - 就像在Visio中一样,因此您可以允许用户选择对象并移动它们或调整它们的大小。每个对象都可以有多个隐藏标签(如座位号或数据库记录指针)。您可以识别用户选择的对象(例如,当用户单击座位22时执行某些操作)。您可以通过代码动态修改属性 - 例如搜索座位22并更改其填充颜色。当然,您也可以滚动,缩放,打印,保存为各种格式等。

#1


Here is product from Nevron. It is paid but doing it all yourself will take lot of time and effort.

这是来自Nevron的产品。这是付出的,但自己做这一切将花费大量的时间和精力。

Open Diagram and EasyDiagram.net are available at Codeplex. Be sure to download and look into their code.

Codeplex提供Open Diagram和EasyDiagram.net。请务必下载并查看他们的代码。

#2


There is Netron Library for diagramming. It is open source and uses GDI+.

有用于图表的Netron库。它是开源的,使用GDI +。

#3


Check out NShape. It is an open source diagramming framework written in C# and quite powerful. Its controls are WinForms controls but you can also use it for WPF.

看看NShape。它是一个用C#编写的开源图表框架,非常强大。它的控件是WinForms控件,但您也可以将它用于WPF。

#4


You might consider using the DSL Toolkit from the Visual Studio SDK. It allows you to create a graphical DSL designer by first creating a domain model, and then creating the graphical notation that will allow users to create or edit instances of that model.

您可以考虑使用Visual Studio SDK中的DSL Toolkit。它允许您通过首先创建域模型,然后创建允许用户创建或编辑该模型实例的图形表示法来创建图形DSL设计器。

You may very well be able to create a graphical notation that looks like a seating area. This would allow your users to not only "diagram", but to produce a file containing a filled-in domain model of what was diagrammed.

您很可能能够创建一个看起来像座位区域的图形符号。这将使您的用户不仅可以“图表”,而且可以生成包含图表内容的填充域模型的文件。

#5


Check out our MetaDraw component - www.MetaDraw.com MetaDraw is designed to make applications like this easy. MetaDraw will support a background image and an annotation layer You can put users into a variety of editing modes - Lines, Curves, Text, Shapes, etc. Every drawn element is distinct - just like in Visio, so you can allow users to select objects and move them around or resize them. Every object can have multiple hidden tags ( like seat numbers or database record pointers ). You can recognize which objects users select ( for instance take some action when user clicks seat 22 ) . You can dynamically modify propertie by code - such as searching for seat 22 and changing it's fill color. Of course you can also scroll, zoom, print, save to a variety of formats and more.

查看我们的MetaDraw组件 - www.MetaDraw.com MetaDraw旨在使这样的应用程序变得简单。 MetaDraw将支持背景图像和注释图层您可以将用户置于各种编辑模式 - 线条,曲线,文本,形状等。每个绘制的元素都是不同的 - 就像在Visio中一样,因此您可以允许用户选择对象并移动它们或调整它们的大小。每个对象都可以有多个隐藏标签(如座位号或数据库记录指针)。您可以识别用户选择的对象(例如,当用户单击座位22时执行某些操作)。您可以通过代码动态修改属性 - 例如搜索座位22并更改其填充颜色。当然,您也可以滚动,缩放,打印,保存为各种格式等。