debugger
شنبه 08 بهمن 1390, 12:36 عصر
من در داخل رویداد tick تایمر کد های زیر را نوشتم که اگر دقت کنید یک تابع extractyahooid هم در اخر کد صدا زده میشه حالا من میخوام ببینم چطوری این بخش از کد هامو در داخل یک thread اجرا کنم
private void TimerExtract_Tick(object sender, EventArgs e)
{
try
{
urlsourcecode = string.Empty;
string inputurl = "http://wwwwwww.ir/son?rnd=" + r.Next(1000, 99999999).ToString() + "";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(inputurl);
//request.Method = "GET";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader urlinputreader = new StreamReader(response.GetResponseStream());
urlsourcecode = urlinputreader.ReadToEnd();
ExtractYahooId();
}
catch
{
return;
}
}
من اومدم یک تابع برای enable کردن تایمر نوشتم و بعد اون تابع را با ترد صدا زدم ولی اونطوری نه خطا میده نه کار می کنه
با تشکر از دوستان
private void TimerExtract_Tick(object sender, EventArgs e)
{
try
{
urlsourcecode = string.Empty;
string inputurl = "http://wwwwwww.ir/son?rnd=" + r.Next(1000, 99999999).ToString() + "";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(inputurl);
//request.Method = "GET";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader urlinputreader = new StreamReader(response.GetResponseStream());
urlsourcecode = urlinputreader.ReadToEnd();
ExtractYahooId();
}
catch
{
return;
}
}
من اومدم یک تابع برای enable کردن تایمر نوشتم و بعد اون تابع را با ترد صدا زدم ولی اونطوری نه خطا میده نه کار می کنه
با تشکر از دوستان