private void DeleteContact() { var item = GetSelectedContact(); if (item == null) { return; } _database.Delete(item.Name); RefreshContacts(); }
private void DeleteContact() { var item = GetSelectedContact(); if (item == null) { return; } if (MessageBox.Show(this, $"Are you sure you want to Delete this Contact?\n \t({item.Name})", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No) { return; } _database.Delete(item.Name); RefreshContacts(); }