private SendResetPassword ( string account ) : void | ||
account | string | |
Результат | void |
private void _forgotLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { if (HaveGoodEmail()) { try { if (_client.UserExists(_emailBox.Text)) { var msg = string.Format( LocalizationManager.GetString("PublishTab.Upload.Login.SendingResetPassword", "We are sending an email to {0} with instructions for how to reset your password."), _emailBox.Text); MessageBox.Show(this, msg, LocalizationManager.GetString("PublishTab.Upload.Login.ResetPassword", "Resetting Password")); _client.SendResetPassword(_emailBox.Text); } else { if (MessageBox.Show(this, LocalizationManager.GetString("PublishTab.Upload.Login.NoRecordOfUser", "We don't have a user on record with that email. Would you like to sign up?"), LocalizationManager.GetString("PublishTab.Upload.Login.UnknownUser", "Unknown user"), MessageBoxButtons.YesNo) == DialogResult.Yes) { SwitchToSignUp(); } } } catch (Exception) { MessageBox.Show(this, LocalizationManager.GetString("PublishTab.Upload.Login.ResetConnectFailed", "Bloom could not connect to the server to reset your password. Please check your network connection."), LocalizationManager.GetString("PublishTab.Upload.Login.ResetFailed", "Reset Password failed"), MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { var msg = LocalizationManager.GetString("PublishTab.Upload.Login.PleaseProvideEmail", "Please enter a valid email address. We will send an email to this address so you can reset your password."); MessageBox.Show(this, msg, LocalizationManager.GetString("PublishTab.Upload.Login.Need Email", "Email Needed")); } }