ImageGlass.frmFaceBookLogin.webBrowser1_Navigated C# (CSharp) Method

webBrowser1_Navigated() private method

private webBrowser1_Navigated ( object sender, System.Windows.Forms.WebBrowserNavigatedEventArgs e ) : void
sender object
e System.Windows.Forms.WebBrowserNavigatedEventArgs
return void
        private void webBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e)
        {
            // whenever the browser navigates to a new url, try parsing the url
            // the url may be the result of OAuth 2.0 authentication.

            Facebook.FacebookOAuthResult oauthResult;
            if (_fb.TryParseOAuthCallbackUrl(e.Url, out oauthResult))
            {
                // The url is the result of OAuth 2.0 authentication.
                FacebookOAuthResult = oauthResult;
                DialogResult = FacebookOAuthResult.IsSuccess ? DialogResult.OK : DialogResult.No;
            }
            else
            {
                // The url is NOT the result of OAuth 2.0 authentication.
                FacebookOAuthResult = null;
            }
        }