/// <summary> /// Handles the Click event of the chartToolStripMenuItem control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance /// containing the event data.</param> private void chartToolStripMenuItem_Click(object sender, EventArgs e) { GenerationMetricChartForm chartForm = new GenerationMetricChartForm(); chartForm.LoadMetrics(this.metrics); chartForm.ShowDialog(this); }
private void runToolStripMenuItem_Click(object sender, EventArgs e) { fractalToolStripMenuItem.Enabled = false; modeToolStripMenuItem.Enabled = false; viewToolStripMenuItem.Enabled = false; benchmarkingToolStripMenuItem.Enabled = false; reportToolStripMenuItem.Enabled = false; Size[] sizes = new Size[] { new Size(320, 240), new Size(640, 480), new Size(800, 600), new Size(1024, 768) }; ConcurrencyMode[] modes = new ConcurrencyMode[] { ConcurrencyMode.SequentialCPU, ConcurrencyMode.ParallelCPU, ConcurrencyMode.GPU }; FractalGenerator[] generators = new FractalGenerator[] { new Julia(), new Mandelbrot() }; this.metrics.Clear(); foreach (Size size in sizes) { this.SetResolution(size.Width, size.Height); foreach (ConcurrencyMode mode in modes) { this.SetConcurrencyMode(mode); foreach (FractalGenerator generator in generators) { this.SetCurrentGenerator(generator); this.Draw(); } } } fractalToolStripMenuItem.Enabled = true; modeToolStripMenuItem.Enabled = true; viewToolStripMenuItem.Enabled = true; benchmarkingToolStripMenuItem.Enabled = true; reportToolStripMenuItem.Enabled = true; GenerationMetricChartForm chartForm = new GenerationMetricChartForm(); chartForm.LoadMetrics(this.metrics); chartForm.ShowDialog(this); }