private void button1_Click(object sender, EventArgs e)//(EDIT THIS CONTACT BUTTON) opens the contact editor (make later) { EditExistingContactWindow form = new EditExistingContactWindow(contactToView); form.ShowDialog(); Close(); }
private void editContactButton_Click(object sender, EventArgs e) { int mainIndex = contactListBox.SelectedIndex; if (mainIndex == -1) { MessageBox.Show("No contacts selected."); //show message to tell user nothing is selected return; //returning early so that it does not try to delete nothing } Contact toEdit = virtualContactList[mainIndex]; EditExistingContactWindow form = new EditExistingContactWindow(toEdit); form.ShowDialog(); refreshListBox(); }
private void editContactButton_Click(object sender, EventArgs e) { int mainIndex = contactListBox.SelectedIndex; if (mainIndex == -1) { MessageBox.Show("No contacts selected.");//show message to tell user nothing is selected return;//returning early so that it does not try to delete nothing } Contact toEdit = virtualContactList[mainIndex]; EditExistingContactWindow form = new EditExistingContactWindow(toEdit); form.ShowDialog(); refreshListBox(); }
//(EDIT THIS CONTACT BUTTON) opens the contact editor (make later) private void button1_Click(object sender, EventArgs e) { EditExistingContactWindow form = new EditExistingContactWindow(contactToView); form.ShowDialog(); Close(); }