Exemplo n.º 1
0
 static void Main(string[] args)
 {
     PageHandler ph = new PageHandler();
     ph.RequestUrl = "http://www.google.co.uk/";
     ph.RequestPage();
     Console.ReadLine();
 }
Exemplo n.º 2
0
 /// <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.");
     }
 }
Exemplo n.º 3
0
 public void SetUp()
 {
     this.handler = new PageHandler();
 }