Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            const int count = 50;
            DateTime  start = DateTime.Now;

            for (int i = 0; i < count; i++)
            {
                Ambertation.Windows.Forms.ExtProgressBar epb = new Ambertation.Windows.Forms.ExtProgressBar();
                epb.Style      = Ambertation.Windows.Forms.ProgresBarStyle.Balance;
                epb.TokenCount = 10;
                epb.Parent     = this;
                epb.Visible    = true;
                epb.Width      = 200;
                epb.Height     = 50;
            }

            TimeSpan run = DateTime.Now - start;

            Console.WriteLine("Init Time for " + count + " items: " + run);
        }
Example #2
0
        /// <summary>
        /// Erforderliche Methode für die Designerunterstützung.
        /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
        /// </summary>
        private void InitializeComponent()
        {
            System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
            this.pbtop     = new System.Windows.Forms.PictureBox();
            this.pbbottom  = new System.Windows.Forms.PictureBox();
            this.pndrop    = new System.Windows.Forms.Panel();
            this.llopt     = new System.Windows.Forms.LinkLabel();
            this.panel2    = new System.Windows.Forms.Panel();
            this.llback    = new System.Windows.Forms.LinkLabel();
            this.llnext    = new System.Windows.Forms.LinkLabel();
            this.pbstretch = new System.Windows.Forms.PictureBox();
            this.lbstep    = new System.Windows.Forms.Label();
            this.pnP       = new System.Windows.Forms.Panel();
            this.pbP       = new Ambertation.Windows.Forms.ExtProgressBar();
            this.lbPmsg    = new System.Windows.Forms.Label();
            this.lbmsg     = new System.Windows.Forms.Label();
            this.pndrop.SuspendLayout();
            this.pnP.SuspendLayout();
            this.SuspendLayout();
            //
            // pbtop
            //
            this.pbtop.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pbtop.BackgroundImage")));
            this.pbtop.Dock            = System.Windows.Forms.DockStyle.Top;
            this.pbtop.Location        = new System.Drawing.Point(0, 0);
            this.pbtop.Name            = "pbtop";
            this.pbtop.Size            = new System.Drawing.Size(612, 153);
            this.pbtop.TabIndex        = 0;
            this.pbtop.TabStop         = false;
            //
            // pbbottom
            //
            this.pbbottom.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pbbottom.BackgroundImage")));
            this.pbbottom.Dock            = System.Windows.Forms.DockStyle.Bottom;
            this.pbbottom.Location        = new System.Drawing.Point(0, 480);
            this.pbbottom.Name            = "pbbottom";
            this.pbbottom.Size            = new System.Drawing.Size(612, 24);
            this.pbbottom.TabIndex        = 1;
            this.pbbottom.TabStop         = false;
            //
            // pndrop
            //
            this.pndrop.Controls.Add(this.llopt);
            this.pndrop.Controls.Add(this.panel2);
            this.pndrop.Controls.Add(this.llback);
            this.pndrop.Controls.Add(this.llnext);
            this.pndrop.Controls.Add(this.pbstretch);
            this.pndrop.Dock     = System.Windows.Forms.DockStyle.Fill;
            this.pndrop.Location = new System.Drawing.Point(0, 153);
            this.pndrop.Name     = "pndrop";
            this.pndrop.Size     = new System.Drawing.Size(612, 327);
            this.pndrop.TabIndex = 4;
            //
            // llopt
            //
            this.llopt.Anchor           = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.llopt.AutoSize         = true;
            this.llopt.BackColor        = System.Drawing.Color.White;
            this.llopt.Font             = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.llopt.LinkColor        = System.Drawing.Color.Red;
            this.llopt.Location         = new System.Drawing.Point(24, 312);
            this.llopt.Name             = "llopt";
            this.llopt.Size             = new System.Drawing.Size(63, 19);
            this.llopt.TabIndex         = 16;
            this.llopt.TabStop          = true;
            this.llopt.Text             = "Options";
            this.llopt.VisitedLinkColor = System.Drawing.Color.Maroon;
            this.llopt.LinkClicked     += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.ShowOptions);
            //
            // panel2
            //
            this.panel2.Anchor    = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.panel2.BackColor = System.Drawing.Color.LightGray;
            this.panel2.Location  = new System.Drawing.Point(338, 309);
            this.panel2.Name      = "panel2";
            this.panel2.Size      = new System.Drawing.Size(232, 1);
            this.panel2.TabIndex  = 15;
            //
            // llback
            //
            this.llback.Anchor           = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.llback.AutoSize         = true;
            this.llback.BackColor        = System.Drawing.Color.White;
            this.llback.Enabled          = false;
            this.llback.Font             = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.llback.LinkColor        = System.Drawing.Color.Red;
            this.llback.Location         = new System.Drawing.Point(458, 311);
            this.llback.Name             = "llback";
            this.llback.Size             = new System.Drawing.Size(57, 19);
            this.llback.TabIndex         = 13;
            this.llback.TabStop          = true;
            this.llback.Text             = "< Back";
            this.llback.VisitedLinkColor = System.Drawing.Color.Maroon;
            this.llback.LinkClicked     += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.Back);
            //
            // llnext
            //
            this.llnext.Anchor           = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.llnext.AutoSize         = true;
            this.llnext.BackColor        = System.Drawing.Color.White;
            this.llnext.Enabled          = false;
            this.llnext.Font             = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.llnext.LinkColor        = System.Drawing.Color.Red;
            this.llnext.Location         = new System.Drawing.Point(522, 311);
            this.llnext.Name             = "llnext";
            this.llnext.Size             = new System.Drawing.Size(56, 19);
            this.llnext.TabIndex         = 12;
            this.llnext.TabStop          = true;
            this.llnext.Text             = "Next >";
            this.llnext.VisitedLinkColor = System.Drawing.Color.Maroon;
            this.llnext.LinkClicked     += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.Next);
            //
            // pbstretch
            //
            this.pbstretch.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pbstretch.BackgroundImage")));
            this.pbstretch.Dock            = System.Windows.Forms.DockStyle.Fill;
            this.pbstretch.Location        = new System.Drawing.Point(0, 0);
            this.pbstretch.Name            = "pbstretch";
            this.pbstretch.Size            = new System.Drawing.Size(612, 327);
            this.pbstretch.TabIndex        = 5;
            this.pbstretch.TabStop         = false;
            //
            // lbstep
            //
            this.lbstep.AutoSize  = true;
            this.lbstep.BackColor = System.Drawing.Color.Transparent;
            this.lbstep.Font      = new System.Drawing.Font("Georgia", 72F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.lbstep.ForeColor = System.Drawing.Color.White;
            this.lbstep.Location  = new System.Drawing.Point(512, 4);
            this.lbstep.Name      = "lbstep";
            this.lbstep.Size      = new System.Drawing.Size(102, 113);
            this.lbstep.TabIndex  = 10;
            this.lbstep.Text      = "0";
            this.lbstep.TextAlign = System.Drawing.ContentAlignment.BottomRight;
            //
            // pnP
            //
            this.pnP.BackColor = System.Drawing.Color.White;
            this.pnP.Controls.Add(this.pbP);
            this.pnP.Controls.Add(this.lbPmsg);
            this.pnP.Location = new System.Drawing.Point(24, 464);
            this.pnP.Name     = "pnP";
            this.pnP.Size     = new System.Drawing.Size(384, 24);
            this.pnP.TabIndex = 5;
            this.pnP.Visible  = false;
            //
            // pbP
            //
            this.pbP.BackColor          = System.Drawing.Color.Transparent;
            this.pbP.BorderColor        = System.Drawing.Color.FromArgb(((System.Byte)(100)), ((System.Byte)(0)), ((System.Byte)(0)), ((System.Byte)(0)));
            this.pbP.Gradient           = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
            this.pbP.GradientEndColor   = System.Drawing.Color.White;
            this.pbP.GradientStartColor = System.Drawing.Color.White;
            this.pbP.Location           = new System.Drawing.Point(0, 4);
            this.pbP.Maximum            = 100;
            this.pbP.Minimum            = 0;
            this.pbP.Name = "pbP";
            this.pbP.ProgressBackColor = System.Drawing.SystemColors.Window;
            this.pbP.Quality           = true;
            this.pbP.SelectedColor     = System.Drawing.Color.Orange;
            this.pbP.Size            = new System.Drawing.Size(128, 16);
            this.pbP.Style           = Ambertation.Windows.Forms.ProgresBarStyle.Flat;
            this.pbP.TabIndex        = 16;
            this.pbP.TokenCount      = 10;
            this.pbP.UnselectedColor = System.Drawing.Color.Gray;
            this.pbP.Value           = 50;
            //
            // lbPmsg
            //
            this.lbPmsg.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                       | System.Windows.Forms.AnchorStyles.Right)));
            this.lbPmsg.Font      = new System.Drawing.Font("Georgia", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.lbPmsg.ForeColor = System.Drawing.Color.Silver;
            this.lbPmsg.Location  = new System.Drawing.Point(128, 0);
            this.lbPmsg.Name      = "lbPmsg";
            this.lbPmsg.Size      = new System.Drawing.Size(256, 24);
            this.lbPmsg.TabIndex  = 15;
            this.lbPmsg.Text      = "Please Wait";
            this.lbPmsg.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            //
            // lbmsg
            //
            this.lbmsg.BackColor = System.Drawing.Color.Transparent;
            this.lbmsg.Font      = new System.Drawing.Font("Georgia", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.lbmsg.ForeColor = System.Drawing.Color.DimGray;
            this.lbmsg.Location  = new System.Drawing.Point(240, 16);
            this.lbmsg.Name      = "lbmsg";
            this.lbmsg.Size      = new System.Drawing.Size(280, 72);
            this.lbmsg.TabIndex  = 6;
            this.lbmsg.Text      = "Description";
            this.lbmsg.TextAlign = System.Drawing.ContentAlignment.BottomRight;
            //
            // Form1
            //
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.BackColor         = System.Drawing.Color.FromArgb(((System.Byte)(102)), ((System.Byte)(102)), ((System.Byte)(153)));
            this.BackgroundImage   = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
            this.ClientSize        = new System.Drawing.Size(612, 504);
            this.Controls.Add(this.pnP);
            this.Controls.Add(this.pndrop);
            this.Controls.Add(this.pbbottom);
            this.Controls.Add(this.lbmsg);
            this.Controls.Add(this.lbstep);
            this.Controls.Add(this.pbtop);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.Icon            = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.MaximizeBox     = false;
            this.MaximumSize     = new System.Drawing.Size(618, 800);
            this.MinimumSize     = new System.Drawing.Size(618, 216);
            this.Name            = "Form1";


            this.Text     = "Wizards of SimPE";
            this.Closing += new System.ComponentModel.CancelEventHandler(this.Close);
            this.Load    += new System.EventHandler(this.Form1_Load);
            this.pndrop.ResumeLayout(false);
            this.pnP.ResumeLayout(false);
            this.ResumeLayout(false);
        }