private void MovieList_MouseDoubleClick(object sender, MouseEventArgs e) { Movie movie = (Movie)MovieList.SelectedItem; Movie movieCopy = new Movie(movie); MovieEditorDialog editor = new MovieEditorDialog(movieCopy); if (editor.ShowDialog() == DialogResult.OK) { movie.Update(movieCopy); } }
private void MovieList_KeyPress(object sender, KeyPressEventArgs e) { Movie movie = (Movie)MovieList.SelectedItem; Movie movieCopy = new Movie(movie); MovieEditorDialog editor = new MovieEditorDialog(movieCopy); if (editor.ShowDialog() == DialogResult.OK) { movie.Update(movieCopy); } }
private void NewButton_Click(object sender, EventArgs e) { Movie movie = new Movie(); MovieEditorDialog editor = new MovieEditorDialog(movie); if (editor.ShowDialog() == DialogResult.OK) { _movies.Add(movie); } testList(); }