示例#1
0
 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);
     }
 }
示例#2
0
 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);
     }
 }
示例#3
0
 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();
 }