private void Btn_Get_Fiction_Poster_Click(object sender, EventArgs e) { if (_th_Main != null && _th_Main.IsAlive) { _th_Main.Abort(); _th_Main.Join(); _th_Main = null; } else { Tbx_Msg.Clear(); _th_Main = new Thread(Thread_Get_Fiction_Poster); _th_Main.Start(); } }
private void Button1_Click(object sender, EventArgs e) { //_4_ScrawlCore._0_BQG.Cls_HomePage _sc = new _4_ScrawlCore._0_BQG.Cls_HomePage("https://www.qu.la/book/3/"); //tb_fiction_info _tfi= _sc._o_Get_Fiction_Info(); //_1_DAL.Cls_Fiction_Info._b_Insert_Fiction_Info(_tfi); if (Nud_Max_Val.Value <= Nud_Min_Val.Value) { MessageBox.Show("爬取范围有误!", "提示"); return; } if (TH_Main != null && TH_Main.IsAlive) { TH_Main.Abort(); TH_Main.Join(); TH_Main = null; } else { Tbx_Msg.Clear(); TH_Main = new Thread(TH_Get_Fiction_Info); TH_Main.Start(); } }