void webBrowser1_DocumentNavigated(object sender, NavigationEventArgs e) { //detect all links found in the navigated page html content var links = WebPageLinkChecker.GetAllLinksFromPageUrl(url); foreach (var link in links) { //insert link to the global links list UiUtility.Links.Add(link); //update UI with the detected link UiUtility.InsertLinkToMainWindowListBox1(link); } }
static void FiddlerAfterSessionCompleteEventHandler(Session s) { // Ignore HTTPS connect requests if (s.RequestMethod == "CONNECT") { return; } // Capture url and request info var link = new Link { Id = RandomNumberGenerator.GenerateRandomNumber(), URL = s.fullUrl, RequestDate = s.Timers.ClientBeginRequest.ToShortDateString() + " " + s.Timers.ClientBeginRequest.ToShortTimeString(), RequestMethod = s.RequestMethod, ResponseCode = s.responseCode.ToString(), }; //insert link to the global links list UiUtility.Links.Add(link); //update UI with the detected link UiUtility.InsertLinkToMainWindowListBox1(link); }