예제 #1
0
 /// <summary>
 /// Creates a webpage module
 /// </summary>
 public WebPage()
 {
     this.uuid = Utils.NewUid();
     this.browser = new SkipDialogBrowser();
     this.browser.Size = new Size(400, 300);
     // Add events
     this.browser.ActiveXBrowser.BeforeNavigate2 += BeforeNavigate2;
     this.browser.Navigated += Navigated;
     this.browser.DocumentCompleted += DocumentCompleted;
     this.browser.NewWindow += NewWindow;
     this.browser.Navigate("about:blank");
     while (loading)
     {
         Application.DoEvents();
     }
     //this.browser.InitialiseOLE();
     // Add WebBrowser external scripting support
     this.browser.ObjectForScripting = new Callback.External(this);
     // Initialize properties
     this.libraryPath = Phantom.libraryPath;
     this.customHeaders = new Dictionary<string, object>();
     this.zoomFactor = 1;
     this.clipRect = new Dictionary<string, object>() {
         { "top", 0 },
         { "left", 0 },
         { "width", 0 },
         { "height", 0 }
     };
 }
예제 #2
0
 public SkipDialogBrowserSite(SkipDialogBrowser host)
     : base(host)
 {
     this.host = host;
 }
예제 #3
0
 /// <summary>
 /// Closes the page and releases memory
 /// </summary>
 public void _close()
 {
     callbackStack.Clear();
     if (browser != null)
     {
         browser.Dispose();
         browser = null;
     }
 }
예제 #4
0
 public SkipDialogBrowserSite(SkipDialogBrowser host)
     : base(host)
 {
     this.host = host;
 }