void listBox1_DoubleClick(object sender, EventArgs e) { //load sample form ExampleAndDesc exAndDesc = this.listBox1.SelectedItem as ExampleAndDesc; if (exAndDesc != null) { FormTestBed1 testBed = new FormTestBed1(); testBed.WindowState = FormWindowState.Maximized; testBed.Show(); testBed.LoadExample(exAndDesc); } }
void listBox1_DoubleClick(object sender, EventArgs e) { //load sample form ExampleAndDesc exAndDesc = this.listBox1.SelectedItem as ExampleAndDesc; if (exAndDesc != null) { switch ((RenderBackendChoice)cmbRenderBackend.SelectedItem) { case RenderBackendChoice.PureAgg: { FormTestBed1 testBed = new FormTestBed1(); testBed.WindowState = FormWindowState.Maximized; testBed.UseGdiPlusOutput = false; testBed.UseGdiAntiAlias = chkGdiAntiAlias.Checked; testBed.Show(); testBed.LoadExample(exAndDesc); } break; case RenderBackendChoice.GdiPlus: { FormTestBed1 testBed = new FormTestBed1(); testBed.WindowState = FormWindowState.Maximized; testBed.UseGdiPlusOutput = true; testBed.UseGdiAntiAlias = chkGdiAntiAlias.Checked; testBed.Show(); testBed.LoadExample(exAndDesc); } break; case RenderBackendChoice.OpenGLES2: { FormGLTest formGLTest = new FormGLTest(); formGLTest.InitGLControl(); formGLTest.Show(); formGLTest.WindowState = FormWindowState.Maximized; formGLTest.LoadExample(exAndDesc); } break; case RenderBackendChoice.SkiaMemoryBackend: { TestSkia1.FormSkia1 formSkia = new TestSkia1.FormSkia1(); formSkia.SelectBackend(TestSkia1.FormSkia1.SkiaBackend.Memory); formSkia.Show(); formSkia.LoadExample(exAndDesc); } break; case RenderBackendChoice.SkiaGLBackend: { TestSkia1.FormSkia1 formSkia = new TestSkia1.FormSkia1(); formSkia.SelectBackend(TestSkia1.FormSkia1.SkiaBackend.GLES); formSkia.Show(); formSkia.LoadExample(exAndDesc); } break; default: throw new NotSupportedException(); } } }