private void buttonChangeLName_Click(object sender, EventArgs e) { try { ValidateProfile.isLastNameCorrect(textBoxLNameChanged.Text); _imov4EProfileSettingsPresenter.ChangeLastName(textBoxLNameChanged.Text); if (_profileScreen.LastName.Equals(textBoxLNameChanged.Text)) { _profileScreen.UpdateLastName(); textBoxLNameChanged.Text = null; MessageBox.Show("You have successfully changed your lastname!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Invalid input", MessageBoxButtons.OK, MessageBoxIcon.Information); } }