private void newButton_Click(object sender, EventArgs e) { NewExerciseForm exerciseForm = new NewExerciseForm(); this.IsMdiContainer = true; exerciseForm.MdiParent = this; exerciseForm.Show(); }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { int test = (int)dataGridView1.Rows[e.RowIndex].Cells[0].Value; Exercise selectedExer = new Exercise(test); NewExerciseForm exerciseForm = new NewExerciseForm(selectedExer, 1); this.IsMdiContainer = true; exerciseForm.MdiParent = this; exerciseForm.Show(); }