private void editButton_Click(object sender, RoutedEventArgs e)
        {
            int    i = contactDataGrid.SelectedIndex;
            Window w = new ContactWindow(_contacts, i, "edit");

            w.Show();
        }
 private void editButton_Click(object sender, RoutedEventArgs e)
 {
     int i = contactDataGrid.SelectedIndex;
     Window w = new ContactWindow(_contacts, i, "edit");
     w.Show();
 }
 private void addButton_Click(object sender, RoutedEventArgs e)
 {
     Window w = new ContactWindow(_contacts, -1, "add");
     w.Show();
 }
        private void addButton_Click(object sender, RoutedEventArgs e)
        {
            Window w = new ContactWindow(_contacts, -1, "add");

            w.Show();
        }