private void OnSupprCommand(object o) { CommandChangedEvent.GetEvent().Handler += CloseValidWindows; _validView = new Validation("Voulez vous vraiment supprimer ce film ?"); _validView.Name = "Validation"; _validView.ShowDialog(); if (_validView.ValidView.Valid == true) { ListFilm.Remove(Film); ToDisplay = ListFilm; NotifyPropertyChanged("ToDisplay"); System.Windows.Forms.MessageBox.Show("Suppression effectuée."); } else { System.Windows.Forms.MessageBox.Show("Suppression annulée."); } }
private void OnEditCommand(object o) { CommandChangedEvent.GetEvent().Handler += CloseEditWindows; _editView = new EditView(Film); _editView.Name = "Editer"; _editView.ShowDialog(); if (_editView.FilmView.Valid == true) { ListFilm.Remove(Film); ListFilm.Add(_editView.FilmView.Film); ToDisplay = ListFilm; NotifyPropertyChanged("ToDisplay"); System.Windows.Forms.MessageBox.Show("Edition effectuée."); } else { System.Windows.Forms.MessageBox.Show("Edition annulée."); } }