本文整理汇总了C#中System.Windows.Forms.ProgressBar类的典型用法代码示例。如果您正苦于以下问题:C# ProgressBar类的具体用法?C# ProgressBar怎么用?C# ProgressBar使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProgressBar类属于System.Windows.Forms命名空间,在下文中一共展示了ProgressBar类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.StartupPanel = new System.Windows.Forms.Panel();
this.OdeoLogo = new System.Windows.Forms.PictureBox();
this.ProgressMeter = new System.Windows.Forms.ProgressBar();
//
// StartupPanel
//
this.StartupPanel.Controls.Add(this.ProgressMeter);
this.StartupPanel.Controls.Add(this.OdeoLogo);
this.StartupPanel.Location = new System.Drawing.Point(0, 3);
this.StartupPanel.Size = new System.Drawing.Size(176, 194);
//
// OdeoLogo
//
this.OdeoLogo.Location = new System.Drawing.Point(42, 49);
this.OdeoLogo.Size = new System.Drawing.Size(92, 39);
//
// ProgressMeter
//
this.ProgressMeter.Location = new System.Drawing.Point(42, 94);
this.ProgressMeter.Size = new System.Drawing.Size(92, 6);
//
// FrmStartup
//
this.ClientSize = new System.Drawing.Size(176, 200);
this.Controls.Add(this.StartupPanel);
this.Text = "Odeo Syncr";
}
开发者ID:matthiase,项目名称:odeo-mobile,代码行数:33,代码来源:FrmStartup.cs
示例2: NotificationPanel
/// <summary>
/// Creates a new control instance.
/// </summary>
public NotificationPanel()
{
this.progressBar = new ProgressBar();
this.labelProgress = new Label();
this.pictureProgress = new PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pictureProgress)).BeginInit();
this.SuspendLayout();
// progressBar
this.progressBar.Location = new Point(62, 40);
this.progressBar.Size = new Size(730, 16);
this.progressBar.TabIndex = 1;
this.progressBar.Visible = false;
// labelProgress
this.labelProgress.Location = new Point(62, 8);
this.labelProgress.Size = new Size(730, 29);
this.labelProgress.TabIndex = 0;
this.labelProgress.TextAlign = ContentAlignment.MiddleLeft;
// pictureProgress
this.pictureProgress.Location = new Point(8, 8);
this.pictureProgress.Size = new Size(48, 48);
this.pictureProgress.TabIndex = 3;
this.pictureProgress.TabStop = false;
// Control.
this.AutoScaleDimensions = new SizeF(6F, 13F);
this.AutoScaleMode = AutoScaleMode.Font;
this.Controls.Add(this.progressBar);
this.Controls.Add(this.labelProgress);
this.Controls.Add(this.pictureProgress);
this.MaximumSize = new Size(0, 64);
this.MinimumSize = new Size(0, 64);
this.Size = new Size(800, 64);
((System.ComponentModel.ISupportInitialize)(this.pictureProgress)).EndInit();
this.ResumeLayout(false);
}
开发者ID:alexbikfalvi,项目名称:DotNetApi,代码行数:37,代码来源:NotificationPanel.cs
示例3: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(DlgInitProgress));
this.progressBar = new System.Windows.Forms.ProgressBar();
this.SuspendLayout();
//
// progressBar
//
this.progressBar.Location = new System.Drawing.Point(12, 38);
this.progressBar.Name = "progressBar";
this.progressBar.Size = new System.Drawing.Size(328, 24);
this.progressBar.TabIndex = 3;
//
// DlgInitProgress
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(352, 101);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.progressBar});
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "DlgInitProgress";
this.ShowInTaskbar = false;
this.Text = "Initializing New Language. Please Wait...";
this.ResumeLayout(false);
}
开发者ID:sillsdev,项目名称:CarlaLegacy,代码行数:31,代码来源:DlgInitProgress.cs
示例4: FrmLogin_Load
private void FrmLogin_Load(object sender, EventArgs e)
{
Image img = CKGen.Properties.Resources.link;
Bitmap myBitmap = new Bitmap(img);
Icon myIcon = Icon.FromHandle(myBitmap.GetHicon());
this.Icon = myIcon;
this.bar = new ProgressBar();
this.bar.Location = new System.Drawing.Point(18, 0);
this.bar.Size = new System.Drawing.Size(367, 10);
this.bar.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
this.bar.Visible = false;
this.Controls.Add(bar);
this.cbServerType.DataSource = typeof(DatabaseType).ToList();
this.cbServerType.DisplayMember = "Value";
this.cbServerType.ValueMember = "Key";
this.btnOK.Enabled = false;
var connList = ConnectionSetting.GetList();
if (connList != null && connList.Count > 0)
{
cbServerName.DataSource = connList;
cbServerName.DisplayMember = "ServerName";
cbServerName.ValueMember = "ServerName";
ShowServer(connList[0].ServerName);
}
this.AcceptButton = this.btnLogin;
}
开发者ID:zhh007,项目名称:CKGen,代码行数:32,代码来源:FrmLogin.cs
示例5: SetProgressBarState
public static void SetProgressBarState(ProgressBar progressBar, int state)
{
if (progressBar == null)
throw new ArgumentNullException("progressBar");
SendMessage(new HandleRef(progressBar, progressBar.Handle), NativeMethods.PBM_SETSTATE, (IntPtr)state, IntPtr.Zero);
}
开发者ID:netide,项目名称:netide,代码行数:7,代码来源:NativeMethods.cs
示例6: DownloadFile
//下载网络文件
/// <summary>
/// 下载网络文件 带进度条
/// </summary>
/// <param name="URL"></param>
/// <param name="fileName"></param>
/// <param name="progressBar1"></param>
/// <returns></returns>
public static bool DownloadFile(string URL, string fileName,ProgressBar progressBar1)
{
try
{
System.Net.HttpWebRequest httpWebRequest1 = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(URL);
System.Net.HttpWebResponse httpWebResponse1 = (System.Net.HttpWebResponse)httpWebRequest1.GetResponse();
long totalLength = httpWebResponse1.ContentLength;
progressBar1.Maximum = (int)totalLength;
System.IO.Stream stream1 = httpWebResponse1.GetResponseStream();
System.IO.Stream stream2 = new System.IO.FileStream(fileName, System.IO.FileMode.Create);
long currentLength = 0;
byte[] by = new byte[1024];
int osize = stream1.Read(by, 0, (int)by.Length);
while (osize > 0)
{
currentLength = osize + currentLength;
stream2.Write(by, 0, osize);
progressBar1.Value = (int)currentLength;
osize = stream1.Read(by, 0, (int)by.Length);
}
stream2.Close();
stream1.Close();
return (currentLength == totalLength);
}
catch
{
return false;
}
}
开发者ID:450640526,项目名称:HtmExplorer,代码行数:43,代码来源:HttpClass.cs
示例7: checkClip
private void checkClip(ProgressBar pb)
{
if (pb.ForeColor == SystemColors.ActiveCaption && pb.Value >= pb.Maximum)
pb.ForeColor = Color.FromArgb(255, 0, 0);
else if(pb.ForeColor == Color.FromArgb(255, 0, 0))
pb.ForeColor = SystemColors.ActiveCaption;
}
开发者ID:JariInc,项目名称:TransducerDriver,代码行数:7,代码来源:TransducerDriver.cs
示例8: UpdateForm
public UpdateForm()
{
this.StartPosition = FormStartPosition.CenterScreen;
this.ClientSize = new Size(220, 90);
this.FormBorderStyle = FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.ControlBox = false;
this.ShowInTaskbar = false;
this.Controls.Add(l_Info = new Label());
l_Info.Location = new Point(0, 0);
l_Info.Size = new Size(220, 60);
l_Info.TextAlign = ContentAlignment.MiddleCenter;
l_Info.Font = new Font(l_Info.Font.ToString(), 10f);
ProgressBar p_Status;
this.Controls.Add(p_Status = new ProgressBar());
p_Status.Location = new Point(10, 60);
p_Status.Size = new Size(200, 20);
p_Status.Style = ProgressBarStyle.Marquee;
t_Work = new Thread(AppUpdate);
t_Work.Start();
}
开发者ID:alexbrain90,项目名称:MediaLoader,代码行数:25,代码来源:UpdateForm.cs
示例9: CombinFile
/// <summary>
/// �ϲ��ļ�
/// </summary>
/// <param name="list">Ҫ�ϲ����ļ�����</param>
/// <param name="strPath">�ϲ�����ļ�����</param>
/// <param name="PBar">��������ʾ</param>
public void CombinFile(string[] strFile, string strPath, ProgressBar PBar)
{
PBar.Maximum = strFile.Length;
FileStream AddStream = null;
//�Ժϲ�����ļ����ƺʹ
|
请发表评论