Created
February 14, 2017 17:50
-
-
Save GeorgeTsiokos/07b7b75b6966ebff3eaa642baf743e3f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class Form1 : Form | |
{ | |
public Form1() | |
{ | |
InitializeComponent(); | |
} | |
private void Form1_Load(object sender, EventArgs e) | |
{ | |
webBrowser1.Navigate("https://login.live.com"); | |
} | |
private async void webBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e) | |
{ | |
if ( e.Url == new Uri("https://account.microsoft.com/unsupported-browser")) | |
{ | |
webBrowser1.Navigate("https://register.build.microsoft.com/auth/login"); | |
} | |
if (webBrowser1.DocumentText == "Too Many Requests") | |
{ | |
await Task.Delay(300); | |
webBrowser1.Navigate("https://register.build.microsoft.com/auth/login"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment