static void Main(string[] args) { PageHandler ph = new PageHandler(); ph.RequestUrl = "http://www.google.co.uk/"; ph.RequestPage(); Console.ReadLine(); }
/// <summary> /// Requests the webpage. /// To keep the UI-Thread responsive the request will be started in a thread. /// </summary> public void RequestWebpage() { String requestUrl = this._WebPageView.Url; bool validUrl = PageHandler.IsValidUrl(requestUrl); if (validUrl) { PageHandler pageHandler = new PageHandler(requestUrl); this._HistoryHandler.AddEntry(requestUrl); Func<SimpleWebResponse> method = pageHandler.FetchUrl; method.BeginInvoke(Done, method); } else { this.DisplayError("The provided url is not valid."); } }
public void SetUp() { this.handler = new PageHandler(); }