private void ContactOnDeleted(object sender, EventArgs e) { ContactViewModel vm = sender as ContactViewModel; ListeContacts.Remove(vm); observer.MoveCurrentToFirst(); }
private void AjoutAmi() { ContactVueModele cvm = new ContactVueModele(new Ami { Nom = "Nouvel", Prenom = "Ami" }); cvm.delFromList += DelFromList; ListeContacts.Add(cvm); }
private void AjoutClient() { ContactVueModele cvm = new ContactVueModele(new Client { Nom = "Nouveau", Prenom = "Client" }); cvm.delFromList += DelFromList; ListeContacts.Add(cvm); }
public void AddToList(object sender, EventArgs e) { ListeContacts.Add(sender as ContactVueModele); }
public void DelFromList(object sender, EventArgs e) { ListeContacts.Remove(sender as ContactVueModele); }