private void menuFindPrxs_Click(object sender, RoutedEventArgs e) { if (pl != null) { if (pl.mIsRunFinding) { MessageBox.Show("Already finding is running", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning); return; } else if (pl.mIsRunTesting) { MessageBox.Show("Already testing is running", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning); return; } } string proxyParam = (mySettings.mUseProxy) ? mySettings.mProxy : String.Empty; pl = new ProxiesList(mySettings.mFindThreadsCount, mySettings.mNeedProxyCount, mySettings.mSearchers, proxyParam, mySettings.mSearchPhrase, mySettings.mTimeOutFind); dtUnsrtd.ItemsSource = pl; pbStatus.Visibility = Visibility.Visible; pl.Changed += new EventHandler(UpdateDataGrid); pl.GetProxiesList(); }
//methods public ProxySearcher(ProxiesList sender, Searcher sr, string SearchPhrase, int StartFromPage, ref List <Searcher> SearchersList, ref Dictionary <string, Proxy> PrxsDic, int PrxsCountNeed, string useProxy, int TimeOut) { mSearcher = sr; mSearchPhrase = SearchPhrase; mSender = sender; mPrxsDic = PrxsDic; mPrxsCountNeed = PrxsCountNeed; mProxy = useProxy; mTimeOut = TimeOut; mT = new Thread(new ThreadStart(ProxyToAssemble)); mIsRun = true; mT.IsBackground = true; mT.Priority = ThreadPriority.Lowest; }
public Enumerator(ProxiesList pl) { mPL = pl; mPos = -1; }