public Bitmap setImage()
        {
            var Canvas = new Bitmap(Width, Height);
            var e = new ProgressingEventArgs();



            for (int i = 0; i < Height; i++)
            {
                double Y = getY(i);
                for (int j = 0; j < Width; j++)
                {
                    double X = getX(j);

                    Canvas.SetPixel(j, i, getColor(X, Y));

                    e.Percent = 100 * (i * Height + j) / (Height * Width);
                    Progressing(this, e);
                }





            }


            e.Percent = 100;
            Progressing(this, e);
            return Canvas;
        }
 void mandelbrot_Progressing(object sender, ProgressingEventArgs e)
 {
     this.progressBar1.Value = e.Percent;
 }