ProgressBarForm 进度条
ProgressBarForm
public partial class ProgressBarForm : Form
{
private Panel panel1 = new System.Windows.Forms.Panel();
private ProgressBar progressBar1 = new System.Windows.Forms.ProgressBar(); public ProgressBarForm()
{
InitializeComponent();
InitializeComponent2();
} public int LoadProgressBarRate(float currentNum, float totalCount)
{
float add = / totalCount;
var currentBar = (int)Math.Ceiling(add * currentNum);
progressBar1.Value = currentBar >= && currentBar <= ? currentBar : ;
Application.DoEvents();
return currentNum == totalCount ? : ;
} private void InitializeComponent2()
{
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.progressBar1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(, );
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(, );
this.panel1.TabIndex = ;
//
// progressBar1
//
this.progressBar1.Dock = System.Windows.Forms.DockStyle.Fill;
this.progressBar1.Location = new System.Drawing.Point(, );
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(, );
this.progressBar1.TabIndex = ;
//
// ProgressBarForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 21F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(, );
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "ProgressBarForm";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "正在传输";
this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
}
}
ProgressBarForm 进度条的更多相关文章
- C#使用进度条,并用线程模拟真实数据 ProgressBar用法(转)
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...
- Android -- 真正的 高仿微信 打开网页的进度条效果
(本博客为原创,http://www.cnblogs.com/linguanh/) 目录: 一,为什么说是真正的高仿? 二,为什么要搞缓慢效果? 三,我的实现思路 四,代码,内含注释 五,使用方法与截 ...
- css3圆形百分比进度条的实现原理
原文地址:css3圆形百分比进度条的实现原理 今天早上起来在查看jquery插件机制的时候,一不小心点进了css3圆形百分比进度条的相关文章,于是一发不可收拾,开始折腾了... 关于圆形圈的实现,想必 ...
- 图解CSS3制作圆环形进度条的实例教程
圆环形进度条制作的基本思想还是画出基本的弧线图形,然后CSS3中我们可以控制其旋转来串联基本图形,制造出部分消失的效果,下面就来带大家学习图解CSS3制作圆环形进度条的实例教程 首先,当有人说你能不能 ...
- 超炫的HTML5粒子效果进度条 VS 如何规范而优雅地code
最近瞎逛的时候发现了一个超炫的粒子进度效果,有多炫呢?请擦亮眼镜! // _this.ch){ _this.particles.splice(i, 1); } }; this.Particle.p ...
- WPF自定义控件第一 - 进度条控件
本文主要针对WPF新手,高手可以直接忽略,更希望高手们能给出一些更好的实现思路. 前期一个小任务需要实现一个类似含步骤进度条的控件.虽然对于XAML的了解还不是足够深入,还是摸索着做了一个.这篇文章介 ...
- python实现一个控制台下的进度条
今天写练习爬虫感觉很需要个进度条,就随手用函数实现了一个,到了晚上突然感觉到这个东西应该单独写出来以后肯定用用得着. 代码也很简单,我就不细讲了,直接上代码了. 测试代码: instance.py i ...
- 【Win 10 应用开发】通过数据绑定更新进度条
实现 INotifyPropertyChanged 接口可以在属性更改后通知数据的使用者,这个相信大伙儿都知道.于是,有朋友会问:对于要实时显示进度的情况,比如更新进度条,能用这个实现吗? 当然是可以 ...
- springMVC+ajax 文件上传 带进度条
前端代码: <form id= "uploadForm"> <p >指定文件名: <input type="text" name= ...
随机推荐
- jmeter实现SMTP邮件协议压测
实现目的 通过jmeter的SMTP取样器,调用SMTP协议,批量进行邮件的发送,已达到压测的目的. 脚本实现 User Defined Variables定义用户变量 编辑SMTP Sampler取 ...
- STA之OCV
Timing sign-off Corner = library PVT +RC Corner + OCV 针对每个工艺结点,foundry都会给出一张类似的timing sign-off表格,定义了 ...
- libcurl库的简介(一)
一.Libcurl库简介 LibCurl是免费的客户端URL传输库,支持FTP,FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, FILE ,LDAP ...
- Cesium 基于MapBox底图加载3DTiles 模型
3DTiles 模型采用 CATIA V5 R22 --->3dxml --->GLB--->B3DM var extent = Cesium.Rectangle.fromDeg ...
- PP Bottle Have High Cycle Times
This year, the participation of 0.1% -0.4% sorbitol nucleating agent in general PP can produce high- ...
- 高级命令之awk
1.提取文件内容 2.提取ip
- java编译器不匹配问题(java compiler level does not match the version of the installed java project facet)
问题:项目经常copy过来,经常会报说Java编译器不匹配 解决方法:找到项目所在的目录,在.settings子目录里面,用文本编辑器打开org.eclipse.wst.common.project. ...
- 00-Docker基本安装
目录 00-Docker基本安装 参考 安装与配置 启动与测试 00-Docker基本安装 Docker Version: 19.03.5
- 「CF894E」 Ralph and Mushrooms
传送门 Luogu 解题思路 首先我们要发现:在同一个强连通分量里的所有边都是可以无限走的. 那么我们就有了思路:先缩点,再跑拓扑排序. 那么问题就是 \(\text{DP}\) 状态如何初始化. 我 ...
- C# 动态类型 以及 脚本调用(scriptRunTime)
在使用中让我感觉 好像 JavaScript中的 动态类型囧 先看动态类型 class Program { static void Main(string[] args) { var streamRe ...