Пример #1
0
        NetworkCredential RequestCredential(string path, NetworkCredential nc)
        {
            NetworkCredential result = CredentialDialog.DoLogin(this, path, nc);

            if (result == null)
            {
                return(null);
            }

            tbUserName.Text = result.UserName;
            tbPassword.Text = result.Password;
            tbDomain.Text   = result.Domain;
            return(result);
        }
Пример #2
0
 public static NetworkCredential DoLogin(IWin32Window owner, string path, NetworkCredential nc)
 {
     using (CredentialDialog f = new CredentialDialog())
         return(f.Login(owner, path, nc));
 }