private void button7_Click(object sender, RoutedEventArgs e) { new Thread(() => { cusBr = browserFactory.CreateCustomBrowser(); }).Start(); label2.Content = "Created in: background thread."; }
public IChatHandler CreateChat1(ChatSpammerSettings settings) { string cacheFolder = cacheDirManager.GetFreeDir(); string proxy = null; if (settings.UseProxy) { proxy = _ProxyDispatcher.GetFreeProxy(); _ProxyDispatcher.SetProxyStatus(proxy, ProxyStatus.UsedNow); } ICustomBrowser browser = CustomBrowserFactory.CreateCustomBrowser( cacheFolder, proxy ); ChatHandler_WrapperForChatvdvoemBasicWorker res = new ChatHandler_WrapperForChatvdvoemBasicWorker(browser); res.CacheFolder = cacheFolder; res.ProxyStr = proxy; return(res); }