private static AuthenticationPrompt CreatePromptResults(RequestPassword requestPassword) { bool canceled = requestPassword.DialogResult == DialogResult.Cancel; return new AuthenticationPrompt { Password = requestPassword.Password, Canceled = canceled }; }
private static AuthenticationPrompt CreatePromptResults(RequestPassword requestPassword) { bool canceled = requestPassword.DialogResult == DialogResult.Cancel; return(new AuthenticationPrompt { Password = requestPassword.Password, Canceled = canceled }); }
internal static AuthenticationPrompt KnowsUserPassword(bool previousTrySuccess) { using (RequestPassword requestPassword = new RequestPassword()) { if(previousTrySuccess) requestPassword.SetWrongPasswordInfo(); requestPassword.ShowDialog(); return CreatePromptResults(requestPassword); } }
internal static AuthenticationPrompt KnowsUserPassword(bool previousTrySuccess) { using (RequestPassword requestPassword = new RequestPassword()) { if (previousTrySuccess) { requestPassword.SetWrongPasswordInfo(); } requestPassword.ShowDialog(); return(CreatePromptResults(requestPassword)); } }