Exemplo n.º 1
0
        private void userNameTextBox_TextChanged(object sender, EventArgs e)
        {
            var _userName = userNameTextBox;

            if (_model.GetUserName(new NullProgress()) != _userName.Text.Trim() && _userName.Text.Trim().Length > 0)
            {
                _model.SetUserName(_userName.Text.Trim(), new NullProgress());
            }
        }
Exemplo n.º 2
0
 private void OnUserName_Validating(object sender, System.ComponentModel.CancelEventArgs e)
 {
     try
     {
         _model.SetUserName(_userName.Text, _progress);
     }
     catch (Exception)
     {
         MessageBox.Show(LocalizationManager.GetString("Messages.CouldNotChangeName", "Could not change the name to that."));
         e.Cancel = true;
         throw;
     }
 }