绘制一些线来在我的asp.net网页上绘制流程图。 [英] Drawing some line to draw a flow diagrams on my asp.net web page.

查看:161
本文介绍了绘制一些线来在我的asp.net网页上绘制流程图。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我想绘制一个流程图,显示钢铁厂的生产和消费价值。



Plant1的输出值将是plant2的输入值。



我想通过线路连接到这些工厂,这将是动态创建的。



通过点击这些行,它将转发到其他一些页面。



工厂可以是一个图片/按钮。



所以,伙计们请尽快回复。



提前致谢。

Hi guys,

I want to draw a flow diagram which will shows the production and consumption values of the steel plants.

Plant1's output value will be the plant2's input value.

I want to connect to those plants by means of line which will be created dynamically.

And by clicking those lines it will forwarded to some other pages.

Plant can be an image/Button.

So, guys please reply as soon as possible.

Thanks in advance.

推荐答案

1。在网页上放置一个图像控件。

1. Place a Image Control on web page.
<asp:image runat="server" id="imgData" xmlns:asp="#unknown" />   



2.在代码端创建位图对象。


2. Create "Bitmap" object on code side.

Bitmap b =new Bitmap(width, height);



3.使用位图帮助创建图形对象。


3. Create "Graphics" object with the help that "Bitmap".

Graphics g = Graphics.FromImage(b);



4.现在使用图形对象方法绘制框&安培;行等...




4. Now Use "Graphics" objects methods for drawing boxes & lines ... etc.

g.FillRectangle(new SolidBrush(Color.White), new Rectangle(0, 0, width, height));
g.DrawEllipse(Pens.LightGray, 0, 0, 50, 50);
g.DrawLine(Pens.LightGray, 0, 2, 50, 100);





5.使用位图对象的保存方法在任何路径上将位图保存到磁盘。





5. Save the "Bitmap" to Disk on any path using save method of "Bitmap" object.

b.Save(Server.MapPath("~\\UserUploadedDocuments\\ImageIcon.jpeg"));





6.将imgData控件ImageUrl属性设置为保存的图像路径。





6. Set "imgData" control ImageUrl property to saved image path.

imgData.ImageUrl = "UserUploadedDocuments\\ImageIcon.jpeg";





这将根据您的需要呈现动态图像。



This will render a dynamic image as per your need.


这篇关于绘制一些线来在我的asp.net网页上绘制流程图。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆