コード例 #1
0
 public void InitializeBrowser(string url = null)
 {
     Execute.OnUIThread(() =>
     {
         if (Browser == null || Browser.IsDisposed)
         {
             _isLoaded = false;
             Browser   = new ExtendedChromiumBrowser(url);
             Browser.BrowserCreated += BrowserOnBrowserCreated;
             Browser.LifeSpanHandler.OnBeforePopup += LifeSpanHandlerOnOnBeforePopup;
             Browser.LoadHandler.OnLoadEnd         += OnLoadEnd;
             Browser.GlobalObject.AddFunction("HideWindow").Execute += HideWindow;
             Host.Child = Browser;
             Host.Child.Refresh();
         }
         else if (!_isLoaded)
         {
             PendingSource = url;
         }
         else
         {
             Browser.LoadUrl(url);
         }
     });
 }
コード例 #2
0
 public WebKitBrowser()
 {
     InitializeComponent();
     Browser = new ExtendedChromiumBrowser();
     Browser.BrowserCreated += BrowserOnBrowserCreated;
     Browser.LifeSpanHandler.OnBeforePopup += LifeSpanHandlerOnOnBeforePopup;
     Browser.LoadHandler.OnLoadEnd         += OnLoadEnd;
     Browser.GlobalObject.AddFunction("HideWindow").Execute += HideWindow;
     Host.Child = Browser;
 }