Beispiel #1
0
 private void initTooMuchPixels()
 {
     this.designPanel.Controls.Clear();
     frame = new Processing("Rendering " + pixels.GetLength(0) + "x" + pixels.GetLength(1) + " Image");
     frame.ShowInTaskbar = false;
     frame.Show();
     frame.Activate();
     frame.Focus();
     frame.changeStatus("creating pixel - part 1");
     for (int x = 0; x < pixels.GetLength(1) / 4; x++)
     {
         for (int y = 0; y < pixels.GetLength(0); y++)
         {
             frame.changeStatus("creating pixel" + x + "," + y);
             pixels[y, x] = new PixelButton();
             pixels[y, x].BackColor = System.Drawing.Color.Transparent;
             pixels[y, x].FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             pixels[y, x].FlatAppearance.BorderSize = 0;
             pixels[y, x].Location = new System.Drawing.Point(0, 0);
             pixels[y, x].Margin = new System.Windows.Forms.Padding(0);
             pixels[y, x].Name = "pixel";
             pixels[y, x].Size = new System.Drawing.Size(4, 4);
             pixels[y, x].UseVisualStyleBackColor = false;
             pixels[y, x].setXY(y, x);
             pixels[y, x].Click += new System.EventHandler(this.pixels_Click);
             pixels[y, x].BackColorChanged += new System.EventHandler(this.pixels_Changed);
             this.designPanel.Controls.Add(pixels[y, x]);
         }
     }
     this.designPanel.Size = new Size(514, 258);
     setSizeLabel();
     redrawTooMuchPixels();
     waitTimer.Start();
 }