private void ButtonEditContact_Click(object sender, EventArgs e) { if (selectedContact == null) { MessageBox.Show("No contact selected!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } contactWindow = new ContactWindow(selectedContact); contactWindow.ShowDialog(); LoadListView(); }
private void ButtonAddContact_Click(object sender, EventArgs e) { contactWindow = new ContactWindow(); contactWindow.ShowDialog(); }
private void ButtonAddContact_Click(object sender, EventArgs e) { contactWindow = new ContactWindow(new Contact("", textBoxAddress.Text)); contactWindow.ShowDialog(); }