private static AuthenticationPrompt CreatePromptResults(RequestPassword requestPassword)
 {
     bool canceled = requestPassword.DialogResult == DialogResult.Cancel;
     return new AuthenticationPrompt
         {
             Password = requestPassword.Password,
             Canceled = canceled
         };
 }
예제 #2
0
        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);
            }
        }
예제 #4
0
        internal static AuthenticationPrompt KnowsUserPassword(bool previousTrySuccess)
        {
            using (RequestPassword requestPassword = new RequestPassword())
            {
                if (previousTrySuccess)
                {
                    requestPassword.SetWrongPasswordInfo();
                }

                requestPassword.ShowDialog();
                return(CreatePromptResults(requestPassword));
            }
        }