void _bw_DoWork(object sender, DoWorkEventArgs e) { WebClient wc = new WebClient(); while (_go) { if (e.Cancel) { break; } while (!_untrackedqueue.isEmpty && TrackEnabled && hastrackurl) { if (e.Cancel) { break; } // get item Track t = _untrackedqueue.Read(); try { wc.UploadValues(TrackUrl, "POST", t.ToQuery()); } catch (Exception ex) { debug("error uploading: " + t.ToQuery() + " " + ex.Message + ex.StackTrace); } System.Threading.Thread.Sleep((int)((double)_SLEEP / 10)); } System.Threading.Thread.Sleep(_SLEEP); } }
void _bw_DoWork(object sender, DoWorkEventArgs e) { WebClient wc = new WebClient(); while (_go) { if (e.Cancel) { break; } while (!_untrackedqueue.isEmpty && TrackEnabled && hastrackurl) { if (e.Cancel) { break; } // get item Track t = _untrackedqueue.Read(); try { // dimon: this is where actual upload of all tracked detail is happaning (wc stands for webClient). // Just comment next line to disable tracking: //wc.UploadValues(TrackUrl, "POST", t.ToQuery()); // <-- this is where actuall tracking (upload) use to happen } catch (Exception ex) { debug("error uploading: " + t.ToQuery() + " " + ex.Message + ex.StackTrace); } System.Threading.Thread.Sleep((int)((double)_SLEEP / 10)); } System.Threading.Thread.Sleep(_SLEEP); } }