public MandelProps(MainForm mainForm, MandelbrotPosition mandelbrotWindow)
 {
     this.mandelbrotWindow = mandelbrotWindow;
     this.mainForm = mainForm;
 }
 public PropsDialog(MainForm mainForm)
 {
     this.mainForm = mainForm;
     InitializeComponent();
 }
        protected override void OnKeyDown(KeyEventArgs e)
        {
            base.OnKeyDown(e);
            if (e.KeyCode == Keys.R)
            {
                _mandelbrotWindow = MandelbrotPosition.Default;

                using (MainForm tempForm = new MainForm())
                {
                    double xFactor = Size.Width / (double)tempForm.Width, yFactor = Size.Height / (double)tempForm.Height;
                    _mandelbrotWindow.Width *= xFactor;
                    _mandelbrotWindow.Height *= yFactor;
                }

                UpdateImageAsync();
            }
            else if (e.KeyCode == Keys.S)
            {
                _parallelRendering = false;
                UpdateImageAsync();
            }
            else if (e.KeyCode == Keys.P)
            {
                _parallelRendering = true;
                UpdateImageAsync();
            }
        }