Example #1
0
        public void Dispose()
        {
            ProxyHelper.SetProxy(null);

            if (browserWrapperIEImpl != null)
            {
                try { browserWrapperIEImpl.Close(); }
                catch { }
                try { browserWrapperIEImpl.Dispose(); }
                catch { }
                try { browserWrapperIEImpl.Destroy(); }
                catch { }
            }

            browserWrapperIEImpl = null;
        }
Example #2
0
 public BrowserWrapperIEImpl()
 {
     lock (_lock)
     {
         if (browserWrapperIEImpl == null)
         {
             _context = AsyncOperationManager.SynchronizationContext;
             using (ManualResetEvent mre = new ManualResetEvent(false))
             {
                 Thread t = new Thread((ThreadStart) delegate
                 {
                     browserWrapperIEImpl = new _BrowserWrapperIEImpl(this);
                     mre.Set();
                     Application.Run();
                 });
                 t.Name         = "IEWrapperMessageLoop";
                 t.IsBackground = true;
                 t.SetApartmentState(ApartmentState.STA);
                 t.Start();
                 mre.WaitOne();
             }
         }
     }
 }