private void backgroundWorker2_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e) { bool flag = true; while (true) { if (SeatKiller.GetUsrInf(false)) { label1.Text = "你好 , " + SeatKiller.name + " 上次网页登录时间 : " + SeatKiller.last_login_time + " 状态 : " + SeatKiller.state + " 违约记录 : " + SeatKiller.violationCount + "次"; if (flag) { SeatKiller.GetNotice(true); flag = false; } } else { Thread.Sleep(30000); SeatKiller.GetToken(false); } Thread.Sleep(10000); } }
private void backgroundWorker3_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e) { SeatKiller.GetNotice(); }