示例#1
0
        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();
        }
示例#2
0
        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();
        }
示例#3
0
        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();
        }
示例#4
0
 //(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();
 }