进度条C#代码帮助 [英] progress bar c# code help

查看:70
本文介绍了进度条C#代码帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做的每个基于客户端服务器体系结构的项目,客户端和服务器都通过Web服务应用程序进行连接.

客户端用户可以在处理服务器内部结果之后将数据发送到服务器端,然后将其发送回客户端,但问题是我要设置进度条,直到客户端显示结果为止
如果您有一些代码或对我来说非常有用,我如何将进度条放在客户端应用程序端

(客户端应用程序是Windows窗体应用程序)

Hi every one I''m doing project based on client server architecture,client and server connect via web service application.

client side user can send the data to server side after processing inside server result send back to the client but problem is i want set progress bar until result display by client side
how i put progress bar to client application side if you have some code or help it''s very much for me

(client application is windows form application)

推荐答案

您始终可以尝试使用
You could always try using a Progress Bar[^].


根据我的理解,您想向用户显示进度条.

1)如何将文件发送到服务器上?大块?

如果没有,则需要逐块发送文件,以便设计进度条.

或者,您可以在
WebClient类 [ ^ ]
这些是WebClient的事件类,将帮助您设计进度.
webclient.downloadfilecompleted [ ^ ]
webclient.uploadfilecompleted [ ^ ]
webclient.downloadprogresschanged [ ^ ]
webclient.uploadprogresschanged [ ^ ]

这些是一些问题在Webclient进度栏上回答.
http://www.dreamincode.net/forums/topic/115491-download -file-asynchronously-with-progressbar/ [ http://social.msdn.microsoft.com/forums /en/netfxnetcom/thread/13b78a45-3b77-4dbf-b0a5-41911a33c49e/ [ http://stackoverflow.com/questions/4172158/c-sharp-progress-bar-和-webclient [ ^ ]

希望这会有所帮助:)
As per my understanding you want to show a progressbar to user.

1) How you sending the files onto server? Chunk by chunk?

If no then you need to send a file chunk by chunk so you can design a progress bar.

Or you can send/receive the files onto server with the help of WebClient class[^]
These are the Events of WebClient class will help you to design a progress.
webclient.downloadfilecompleted[^]
webclient.uploadfilecompleted[^]
webclient.downloadprogresschanged[^]
webclient.uploadprogresschanged[^]

These are some question & answer on Webclient Progressbar.
http://www.dreamincode.net/forums/topic/115491-download-file-asynchronously-with-progressbar/[^]
http://social.msdn.microsoft.com/forums/en/netfxnetcom/thread/13b78a45-3b77-4dbf-b0a5-41911a33c49e/[^]
http://stackoverflow.com/questions/4172158/c-sharp-progress-bar-and-webclient[^]

Hope this helps :)


这篇关于进度条C#代码帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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