Ejemplo n.º 1
0
 public static void Iterate(Bitmap image, IterationCallback callback)
 {
     for (int y = 0; y <= image.Height - 1; y++)
     {
         for (int x = 0; x <= image.Width - 1; x++)
         {
             callback(new Point(x, y));
         }
     }
 }
Ejemplo n.º 2
0
        public void ShowProgressBar(int count, IterationCallback callback)
        {
            this._iterationCallback  = callback;
            this._count              = count;
            this.progressBar.Maximum = this._count;

            this._thread      = new Thread(Execute);
            this._thread.Name = "ProgressForm Iteration Thread";

            this.ShowDialog();
            this.CloseThread();
        }
Ejemplo n.º 3
0
        public void ShowProgressBar(int count, IterationCallback callback)
        {
            this._iterationCallback = callback;
            this._count = count;
            this.progressBar.Maximum = this._count;

            this._thread = new Thread (Execute);
            this._thread.Name = "ProgressForm Iteration Thread";

            this.ShowDialog ();
            this.CloseThread ();
        }
Ejemplo n.º 4
0
 /// <summary> execute Action for each point. Params are Point,index,length. </summary>
 public void ForEach(IterationCallback iterationCallback)
 {
     for (var i = 0; i < PointsCount; i++) iterationCallback(points[i], i, PointsCount);
 }