コード例 #1
0
 private void btnTestCredentials_Click(object sender, RoutedEventArgs e)
 {
     if (CredentialTester.TestCredentials("", txtNetworkUser.Text, txtNetworkPassword.Password))
     {
         MessageBox.Show("Credentials validated successfully", "MPExtended", MessageBoxButton.OK, MessageBoxImage.Information);
     }
     else
     {
         MessageBox.Show("Failed to login using network credentials", "MPExtended", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
コード例 #2
0
 private void btnTestCredentials_Click(object sender, RoutedEventArgs e)
 {
     if (CredentialTester.TestCredentials("", txtNetworkUser.Text, txtNetworkPassword.Password))
     {
         MessageBox.Show(UI.CredentialValidationSuccessful, "MPExtended", MessageBoxButton.OK, MessageBoxImage.Information);
     }
     else
     {
         MessageBox.Show(UI.CredentialValidationFailed, "MPExtended", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
コード例 #3
0
        private void btnTestCredentials_Click(object sender, RoutedEventArgs e)
        {
            var domuser = GetDomainAndUsername(txtNetworkUser.Text);

            if (CredentialTester.TestCredentials(domuser.Item1, domuser.Item2, txtNetworkPassword.Password))
            {
                WpfMessageBox.Show(UI.CredentialValidationSuccessful, "MPExtended", MessageBoxButton.OK, MessageBoxImage.Information);
            }
            else
            {
                WpfMessageBox.Show(UI.CredentialValidationFailed, "MPExtended", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
コード例 #4
0
        private void btnTestCredentials_Click(object sender, RoutedEventArgs e)
        {
            var domuser = GetDomainAndUsername(txtNetworkUser.Text);

            if (CredentialTester.TestCredentials(domuser.Item1, domuser.Item2, txtNetworkPassword.Password))
            {
                lblCredentialResults.Content    = UI.CredentialsValid;
                lblCredentialResults.Foreground = Brushes.Green;
            }
            else
            {
                lblCredentialResults.Content    = UI.CredentialsInvalid;
                lblCredentialResults.Foreground = Brushes.Red;
            }
        }