示例#1
0
 public void Dispose()
 {
     if (this._browser != null)
     {
         this._browser.Dispose();
         this._browser = null;
     }
 }
示例#2
0
        public void InitBrowser()
        {
            this._browser                = new BrowserWrapper(lastUrl ?? "about:blank", automaticallyCreateBrowser: false, target: _target);
            _browser.RequestHandler      = new CustomRequestHandler(this);
            _browser.MenuHandler         = new ContextMenuHandler(_ctxMenuCallback);
            _browser.BrowserInitialized += _browser_BrowserInitialized;
            _browser.FrameLoadStart     += Browser_FrameLoadStart;
            _browser.FrameLoadEnd       += Browser_FrameLoadEnd;
            _browser.LoadError          += Browser_LoadError;
            _browser.ConsoleMessage     += Browser_ConsoleMessage;
            _browser.DragHandler         = new DragHandler(this);

            if (_api != null)
            {
                SetApi(_api);
            }
        }