private void linkLabelResetPassword_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { ResetPasswordForm resetPasswordForm = new ResetPasswordForm(); StandaloneView standaloneView = new StandaloneView(this, resetPasswordForm); standaloneView.Show(); }
public void ResetPassword(object sender, EventArgs e) { string value = email.GetValue() as string; user = UserController.FromEmail(value); if (user == null) { MessageBox.Show("Пользователь не найден"); return; } value = code.GetValue() as string; if (!user.CheckUserCode(value)) { MessageBox.Show("Неверный код"); return; } ChangePasswordForm changePasswordForm = new ChangePasswordForm(user); StandaloneView standaloneView = new StandaloneView(parentForm, changePasswordForm); parentForm.Close(); standaloneView.Show(); }