Click here to Skip to main content
15,896,201 members
Articles / Programming Languages / C# 4.0

EasyProgressBarPacket

Rate me:
Please Sign up or sign in to vote.
4.84/5 (42 votes)
18 Nov 2011CPOL4 min read 67.3K   6.9K   105  
A few progressbar examples with clone support.
namespace TestApplication
{
    partial class ProgressBarSample
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.label1 = new System.Windows.Forms.Label();
            this.hr = new System.Windows.Forms.GroupBox();
            this.btnExit = new System.Windows.Forms.Button();
            this.label2 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.label5 = new System.Windows.Forms.Label();
            this.label6 = new System.Windows.Forms.Label();
            this.dspTextBox = new System.Windows.Forms.TextBox();
            this.vTextBox = new System.Windows.Forms.TextBox();
            this.borderComboBox = new System.Windows.Forms.ComboBox();
            this.lblColor1 = new System.Windows.Forms.Label();
            this.lblColor2 = new System.Windows.Forms.Label();
            this.btnReset = new System.Windows.Forms.Button();
            this.btnUpdate = new System.Windows.Forms.Button();
            this.colorDialog1 = new System.Windows.Forms.ColorDialog();
            this.chkColorizer = new System.Windows.Forms.CheckBox();
            this.easyProgressBar1 = new EasyProgressBarPacket.EasyProgressBar();
            this.SuspendLayout();
            // 
            // label1
            // 
            this.label1.BackColor = System.Drawing.Color.White;
            this.label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.label1.Dock = System.Windows.Forms.DockStyle.Top;
            this.label1.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(162)));
            this.label1.ForeColor = System.Drawing.Color.Black;
            this.label1.Location = new System.Drawing.Point(0, 0);
            this.label1.Name = "label1";
            this.label1.Padding = new System.Windows.Forms.Padding(20, 0, 0, 0);
            this.label1.Size = new System.Drawing.Size(450, 60);
            this.label1.TabIndex = 6;
            this.label1.Text = "EasyProgressBar Sample";
            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            // 
            // hr
            // 
            this.hr.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.hr.Location = new System.Drawing.Point(-4, 258);
            this.hr.Name = "hr";
            this.hr.Size = new System.Drawing.Size(458, 7);
            this.hr.TabIndex = 7;
            this.hr.TabStop = false;
            // 
            // btnExit
            // 
            this.btnExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.btnExit.Location = new System.Drawing.Point(357, 271);
            this.btnExit.Name = "btnExit";
            this.btnExit.Size = new System.Drawing.Size(81, 23);
            this.btnExit.TabIndex = 8;
            this.btnExit.Text = "Exit";
            this.btnExit.UseVisualStyleBackColor = true;
            this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(37, 83);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(79, 13);
            this.label2.TabIndex = 10;
            this.label2.Text = "Display Format:";
            // 
            // label3
            // 
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(37, 113);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(37, 13);
            this.label3.TabIndex = 11;
            this.label3.Text = "Value:";
            // 
            // label4
            // 
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(37, 143);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(67, 13);
            this.label4.TabIndex = 12;
            this.label4.Text = "Border Style:";
            // 
            // label5
            // 
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(37, 173);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(84, 13);
            this.label5.TabIndex = 13;
            this.label5.Text = "Progress Color1:";
            // 
            // label6
            // 
            this.label6.AutoSize = true;
            this.label6.Location = new System.Drawing.Point(37, 203);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(84, 13);
            this.label6.TabIndex = 14;
            this.label6.Text = "Progress Color2:";
            // 
            // dspTextBox
            // 
            this.dspTextBox.Location = new System.Drawing.Point(144, 80);
            this.dspTextBox.Name = "dspTextBox";
            this.dspTextBox.Size = new System.Drawing.Size(161, 20);
            this.dspTextBox.TabIndex = 15;
            this.dspTextBox.Text = "done";
            // 
            // vTextBox
            // 
            this.vTextBox.Location = new System.Drawing.Point(144, 110);
            this.vTextBox.Name = "vTextBox";
            this.vTextBox.Size = new System.Drawing.Size(81, 20);
            this.vTextBox.TabIndex = 16;
            this.vTextBox.Text = "20";
            // 
            // borderComboBox
            // 
            this.borderComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.borderComboBox.Items.AddRange(new object[] {
            "Flat",
            "Sunken",
            "Raised"});
            this.borderComboBox.Location = new System.Drawing.Point(144, 140);
            this.borderComboBox.Name = "borderComboBox";
            this.borderComboBox.Size = new System.Drawing.Size(81, 21);
            this.borderComboBox.TabIndex = 17;
            // 
            // lblColor1
            // 
            this.lblColor1.BackColor = System.Drawing.Color.LightSteelBlue;
            this.lblColor1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.lblColor1.Cursor = System.Windows.Forms.Cursors.Hand;
            this.lblColor1.Location = new System.Drawing.Point(144, 172);
            this.lblColor1.Name = "lblColor1";
            this.lblColor1.Size = new System.Drawing.Size(40, 18);
            this.lblColor1.TabIndex = 18;
            this.lblColor1.Click += new System.EventHandler(this.lblColor1_Click);
            // 
            // lblColor2
            // 
            this.lblColor2.BackColor = System.Drawing.Color.LightBlue;
            this.lblColor2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.lblColor2.Cursor = System.Windows.Forms.Cursors.Hand;
            this.lblColor2.Location = new System.Drawing.Point(144, 202);
            this.lblColor2.Name = "lblColor2";
            this.lblColor2.Size = new System.Drawing.Size(40, 18);
            this.lblColor2.TabIndex = 19;
            this.lblColor2.Click += new System.EventHandler(this.lblColor2_Click);
            // 
            // btnReset
            // 
            this.btnReset.Location = new System.Drawing.Point(200, 172);
            this.btnReset.Name = "btnReset";
            this.btnReset.Size = new System.Drawing.Size(72, 48);
            this.btnReset.TabIndex = 20;
            this.btnReset.Text = "Reset";
            this.btnReset.UseVisualStyleBackColor = true;
            this.btnReset.Click += new System.EventHandler(this.btnReset_Click);
            // 
            // btnUpdate
            // 
            this.btnUpdate.Location = new System.Drawing.Point(278, 172);
            this.btnUpdate.Name = "btnUpdate";
            this.btnUpdate.Size = new System.Drawing.Size(72, 48);
            this.btnUpdate.TabIndex = 21;
            this.btnUpdate.Text = "Update";
            this.btnUpdate.UseVisualStyleBackColor = true;
            this.btnUpdate.Click += new System.EventHandler(this.btnUpdate_Click);
            // 
            // chkColorizer
            // 
            this.chkColorizer.Location = new System.Drawing.Point(37, 228);
            this.chkColorizer.Name = "chkColorizer";
            this.chkColorizer.Size = new System.Drawing.Size(117, 24);
            this.chkColorizer.TabIndex = 23;
            this.chkColorizer.Text = "IsColorizerEnabled:";
            this.chkColorizer.UseVisualStyleBackColor = true;
            // 
            // easyProgressBar1
            // 
            this.easyProgressBar1.AlphaMaker = null;
            this.easyProgressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.easyProgressBar1.BackgroundGradient.ColorEnd = System.Drawing.Color.WhiteSmoke;
            this.easyProgressBar1.BorderColor = System.Drawing.Color.LightGray;
            this.easyProgressBar1.Location = new System.Drawing.Point(236, 18);
            this.easyProgressBar1.Name = "easyProgressBar1";
            this.easyProgressBar1.ProgressGradient.ColorEnd = System.Drawing.Color.LightBlue;
            this.easyProgressBar1.ProgressGradient.ColorStart = System.Drawing.Color.LightSteelBlue;
            this.easyProgressBar1.Size = new System.Drawing.Size(196, 25);
            this.easyProgressBar1.TabIndex = 9;
            this.easyProgressBar1.Text = "20% done";
            // 
            // ProgressBarSample
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(450, 317);
            this.Controls.Add(this.easyProgressBar1);
            this.Controls.Add(this.chkColorizer);
            this.Controls.Add(this.btnUpdate);
            this.Controls.Add(this.btnReset);
            this.Controls.Add(this.lblColor2);
            this.Controls.Add(this.lblColor1);
            this.Controls.Add(this.borderComboBox);
            this.Controls.Add(this.vTextBox);
            this.Controls.Add(this.dspTextBox);
            this.Controls.Add(this.label6);
            this.Controls.Add(this.label5);
            this.Controls.Add(this.label4);
            this.Controls.Add(this.label3);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.btnExit);
            this.Controls.Add(this.hr);
            this.Controls.Add(this.label1);
            this.MaximizeBox = false;
            this.MaximumSize = new System.Drawing.Size(550, 400);
            this.MinimumSize = new System.Drawing.Size(438, 351);
            this.Name = "ProgressBarSample";
            this.ShowIcon = false;
            this.ShowInTaskbar = false;
            this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
            this.Text = "ProgressBarSample";
            this.Load += new System.EventHandler(this.ProgressBarSample_Load);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.GroupBox hr;
        private System.Windows.Forms.Button btnExit;
        private EasyProgressBarPacket.EasyProgressBar easyProgressBar1;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.Label label6;
        private System.Windows.Forms.TextBox dspTextBox;
        private System.Windows.Forms.TextBox vTextBox;
        private System.Windows.Forms.ComboBox borderComboBox;
        private System.Windows.Forms.Label lblColor1;
        private System.Windows.Forms.Label lblColor2;
        private System.Windows.Forms.Button btnReset;
        private System.Windows.Forms.Button btnUpdate;
        private System.Windows.Forms.ColorDialog colorDialog1;
        private System.Windows.Forms.CheckBox chkColorizer;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) ARELTEK
Turkey Turkey
Since 1998...

MCPD - Enterprise Application Developer

“Hesaplı hareket ettiğini zanneden ve onunla iftihar eyliyen dar kafalar; kurtulmağa, yükselmeğe elverişli hiç bir eser vücüda getirmezler. Kurtuluş ve yükselişi, ancak varlığına dayanan ve mülkü milletin gizli kapalı hazinelerini verimli hale getirmesini bilen, şahsi menfaatini millet menfaati uğruna feda eden, ruhu idealist, dimağı realist şahsiyetlerde aramalıdır.”

Nuri Demirağ, 1947

Comments and Discussions