public void InitializeFrom(IComBrowser browser)
 {
     if (InvokeRequired)
     {
         BeginInvoke(new Action(() => { browserView1.InitializeFrom((browser as BrowserImpl)?.Browser); }));
     }
     else
     {
         browserView1.InitializeFrom((browser as BrowserImpl)?.Browser);
     }
 }
 public ComBrowserView()
 {
     try
     {
         ConfigureLogging();
         InitializeComponent();
         _engineWrapper = new EngineWrapper();
         _engineWrapper.Initialize();
         Browser = _engineWrapper.CreateBrowser();
         InitializeFrom(Browser);
         Browser.LoadUrl("teamdev.com/dotnetbrowser");
         EventLogWrapper.Log("ComBrowserView initialized", EventLogEntryType.Information, 201);
     }
     catch (Exception e)
     {
         EventLogWrapper.Log(e.ToString(), EventLogEntryType.Error, 500);
         throw;
     }
 }