private void AcceptButton_Click(object sender, EventArgs e)
{
string inputLocationName = newLocationNameTextbox.Text;
string inputCityName = newCityNameTextBox.Text;
if (!string.IsNullOrWhiteSpace(inputLocationName) && !string.IsNullOrWhiteSpace(inputCityName)) {
_targetLocation.SetLocationAndCityName(inputLocationName, inputCityName);
if (this._updateParentCallback != null) {
this._updateParentCallback();
}
MessageBox.Show("Locatie succesvol gewijzigd!");
if (AbstractDialog.Current != null) {
AbstractDialog.Current.Hide();
}
}
else {
MessageBoxUtil.ShowError("Foutmelding", "U dient een nieuwe naam voor de locatienaam en/of de plaatsnaam in te vullen in te vullen.");
}
}