ArcGISWindowsPhoneSDK.PortalSearch.SignInButton_Click C# (CSharp) Метод

SignInButton_Click() приватный Метод

private SignInButton_Click ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
Результат void
        private void SignInButton_Click(object sender, RoutedEventArgs e)
        {
            ResultsListBox.ItemsSource = null;
            WebmapContent.Children.Clear();
            IdentityManager.Current.GenerateCredentialAsync(DEFAULT_SERVER_URL, UsernameTB.Text, PasswordTB.Password, (crd, ex) =>
            {
                if (crd != null)
                {
                    IdentityManager.Current.AddCredential(crd);
                    portal.InitializeAsync(DEFAULT_SERVER_URL, (credential, exception) =>
                    {
                        if (credential != null && credential.CurrentUser != null)
                        {
                            ResetVisibility();
                            (ApplicationBar.Buttons[0] as IApplicationBarIconButton).Text = "Sign Out";
                        }
                    });
                }
                else
                {
                    MessageBox.Show("Could not log in. Please check credentials.");
                }
            });
        }