private void modifyToolStripMenuItem_Click(object sender, EventArgs e) { CompontBaseForm form = null; switch (_select_data.type) { case CmpontType.PARABOLOIDMIRROR: form = new ParaboloidForm(); break; case CmpontType.HYPERNOLOIDMIRROR: form = new HyperboloidForm(); break; case CmpontType.PLANEMIRROR: form = new PlaneForm(); break; case CmpontType.ELLIPSOIDMIRROR: form = new EllipsoidForm(); break; case CmpontType.GUASSIANSOURCE: form = new GuassianForm(); break; default: return; } form.setData(_select_data); form.getData += new CompontBaseForm.getDataHandler(ModifyCompont); form.setRender(renderWindowControl1.RenderWindow); form.cancel += new CompontBaseForm.cancelHandler(cancelCompont); form.Show(this); }
private void ellipsoidToolStripMenuItem_Click(object sender, EventArgs e) { EllipsoidForm form = new EllipsoidForm(); form.getData += new CompontBaseForm.getDataHandler(AddCompont); form.setRender(renderWindowControl1.RenderWindow); form.cancel += new CompontBaseForm.cancelHandler(cancelCompont); form.Show(this); }