コード例 #1
0
        public WebBrowserForm()
        {
            InternetExplorerVersion.ChangeEmbeddedVersion();

            InitializeComponent();
            extendedWebBrowser1.OnNavigating().Subscribe(args =>
            {
                Log.Info().WriteLine(args.Url.AbsoluteUri);
            });
        }
コード例 #2
0
        /// <summary>
        ///     Constructor for an OAuth login form
        /// </summary>
        /// <param name="browserTitle">title of the form</param>
        /// <param name="size">size of the form</param>
        /// <param name="authorizationLink">Uri for the link</param>
        /// <param name="callbackUrl">Uri for the callback</param>
        public OAuthLoginForm(string browserTitle, Size size, Uri authorizationLink, string callbackUrl)
        {
            // Make sure we use the most recent version of IE
            InternetExplorerVersion.ChangeEmbeddedVersion();

            _callbackUrl = callbackUrl;
            InitializeComponent();
            ClientSize           = size;
            Text                 = browserTitle;
            _addressTextBox.Text = authorizationLink.ToString();

            // The script errors are suppressed by using the ExtendedWebBrowser
            _browser.ScriptErrorsSuppressed = false;
            _browser.DocumentCompleted     += Browser_DocumentCompleted;
            _browser.Navigated  += Browser_Navigated;
            _browser.Navigating += Browser_Navigating;
            _browser.Navigate(authorizationLink);
            Load += OAuthLoginForm_Load;
        }
コード例 #3
0
 public static bool SetInternetExplorerEmulationRegistryKey(InternetExplorerVersion ieVersion)
 {
     return(SetInternetExplorerEmulationRegistryKey((ieVersion == InternetExplorerVersion.None) ? null : (int?)ieVersion));
 }