private void OnContactAddPerson(object sender, EventArgs e)
        {
            var form = new PersonContactEditForm();

            do
            {
                if (form.ShowDialog(this) != DialogResult.OK)
                {
                    return;
                }

                if (_contacts.Add(form.Contact))
                {
                    UpdateUI();
                    return;
                }
                ;

                MessageBox.Show(this, "Error adding contact", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            } while (true);
        }
        private void EditContact()
        {
            var contact = GetSelectedContact() as PersonContact;

            if (contact == null)
            {
                return;
            }

            var form = new PersonContactEditForm()
            {
                Contact = contact
            };

            if (form.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }

            UpdateUI();
        }