?? forumupdate.cs
字號(hào):
/// <Copyright>
/// This Program Written By Luyan(5drush)
/// 2002/4/23
/// Email:nluyan@163.net
/// QQ:5743345
/// </Copyright>
///
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace CSDN
{
/// <summary>
/// ForumUpdate 的摘要說(shuō)明。
/// </summary>
public class ForumUpdate : System.Windows.Forms.Form
{
private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.Label label1;
/// <summary>
/// 必需的設(shè)計(jì)器變量。
/// </summary>
private System.ComponentModel.Container components = null;
public ForumUpdate()
{
//
// Windows 窗體設(shè)計(jì)器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 調(diào)用后添加任何構(gòu)造函數(shù)代碼
//
}
/// <summary>
/// 清理所有正在使用的資源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
public void SetMax(int Value)
{
this.progressBar1.Maximum = Value;
}
public void Add()
{
this.progressBar1.Value += 1;
int t = progressBar1.Value + 1;
this.label1.Text = t.ToString() + "/" + progressBar1.Maximum.ToString();
if(progressBar1.Value == progressBar1.Maximum - 1)
this.Close();
}
public string ProgressText
{
set
{
this.label1.Text = value;
}
}
#region Windows Form Designer generated code
/// <summary>
/// 設(shè)計(jì)器支持所需的方法 - 不要使用代碼編輯器修改
/// 此方法的內(nèi)容。
/// </summary>
private void InitializeComponent()
{
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(24, 16);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(232, 23);
this.progressBar1.Step = 1;
this.progressBar1.TabIndex = 0;
//
// label1
//
this.label1.Location = new System.Drawing.Point(128, 48);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(72, 16);
this.label1.TabIndex = 1;
this.label1.Text = "/";
//
// ForumUpdate
//
this.AutoScale = false;
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(292, 69);
this.ControlBox = false;
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.label1,
this.progressBar1});
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ForumUpdate";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "同步討論區(qū)...";
this.TopMost = true;
this.Closed += new System.EventHandler(this.ForumUpdate_Closed);
this.ResumeLayout(false);
}
#endregion
private void ForumUpdate_Closed(object sender, System.EventArgs e)
{
this.progressBar1.Value = 0;
}
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -