private void addContactBut_Click(object sender, RoutedEventArgs e) { addContact addContactWindow = new addContact(contactManager); addContactWindow.Owner = this; addContactWindow.ShowDialog(); }
private void editContactBut_Click(object sender, RoutedEventArgs e) { if (contactsListBox.SelectedItem != null) { Contact contact = contactsListBox.SelectedItem as Contact; addContact addContactWindow = new addContact(contactManager, contact); addContactWindow.Owner = this; addContactWindow.ShowDialog(); } }