具有百分比计算的进度栏 [英] Progress Bar with percentage Calculation

查看:951
本文介绍了具有百分比计算的进度栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

下载&时,我需要并行显示进度条和百分比计算将记录写入Excel工作表.

基于inut参数,查询将触发并从​​数据库中获取信息,该结果数据将被写入Excel工作表中.该文件将保留在文件系统中.

因此上述过程将需要一些时间,具体取决于时间需要计算百分比以可视化进度条以及百分比,下载的数量和需要下载的数量.

根据我的假设,处理速度将考虑以下因素,例如:
1)取决于服务器性能最终用户的CPU使用率
2)数据库级别的记录可用数量
3)查询优化
4)所需的数据大小.等...

我读了很多文章,全部都是
进度条的增长是静态的增量方式,此实现永远不会考虑以上几点.
所以最后我需要直播百分比,进度栏.

问候
Ashok

Hi All,

I need progress bar along with percentage calculation parallelly while downloading & writing the records to Excel sheet.

Based on the inut parameters, the query will triggered and fetch the information from database, that resultant data will be write into Excel sheet. That file will be maintained at file system.

So above process will take some time, based on time needs to calcualte the percentage to visualise the progress bar along with percentage, how much downloaded and how much needs to download.

As per my assumptions that process speed will consider on following factors Like:
1) Depends on server performance & End user cpu utilisation
2) No. of records availability at database level
3) Query optimisation
4) Required data size. etc...

I read so many article, all of are
Progress bar growthis in incremental way that is statically, this implementation never consider above points.
So finally I need live percentage, progress bar.

Regards
Ashok

推荐答案

据我了解,您的问题不是进度条,而是百分比值的计算.只有根据您在程序中可以收集的信息才能执行此操作.
As I understand your question, the issue here is not the progress bar but the calculation of the percentage values. That is something only you can do based on the information you are able to collect within your program.


在这种情况下,请不要使用连续"或块"样式,而应使用字幕"样式ProgressBar.

示例:

In this situation, please don''t use Continuous or Blocks style, use Marquee style of ProgressBar.

Example:

public void LoadData(){
   progressBar.Style = ProgressBarStyle.Marquee;
   progressBar.Visible = true;//Show progress bar
   //Code to load data into Control
   progressBar.Visible = false;//Hide progress bar
}


这篇关于具有百分比计算的进度栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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