没弹窗啊。可以给你看代码。
[C#] 纯文本查看 复制代码 private void ThrCaiji()
{
string html;
_a cj = new _a();
while (true)
{
if (zzxc)
break;
Thread.Sleep(800);
for (int j = 0; j < 1; j++)//查找最后几页的 1
{
html = cj.gethttp(qwy((int.Parse(zys) - j).ToString()), "Get", "", "", false, "gb2312");
//html = cj.dqwynr(qwy((int.Parse(zys) - j).ToString()));
Monitor.Enter(this);//进入线程锁
zys = cj.qzys(html);
Monitor.Exit(this); //退出
string pp = cj.zzppwb(html, "<ul class=\"pdlist_info\">[\\s|\\S]*?<ul class=\"pdlist_num\">"); //一次
string[] arr = new string[] { "|||" };
string[] pp_nr = pp.Split(arr, StringSplitOptions.None);
for (int i = 0; i < pp_nr.Length; i++) //遍历过滤.
{//MessageBox.Show(pp_nr);
string dq_xy = cj.qxyd(pp_nr); //网页信誉
bool dq_hg = cj.xysfhg(szxy, dq_xy); //是否合格
if (dq_hg)
{
Monitor.Enter(this);//进入线程锁
string dq_ddxx = cj.qddxx(pp_nr); //订单信息
string dq_jg = cj.qjg(pp_nr); //取价格。
// TextBox.AppendText(dq_jg);
string dq_sj = cj.dwb(Application.StartupPath + "\\订单数据库.txt");
if (cj.zfccz(dq_sj, dq_ddxx + "|" + dq_jg) < 0) //有新单。
{
string dq_bt = cj.qbt(pp_nr); //标题
string dq_qf = cj.qqf(pp_nr); //区
//插入列表。
this.listView1.Items.Insert(0, "").SubItems.AddRange(new string[] { "", "", "", "", "", "" });//插入一项目 6项
this.listView1.Items[0].SubItems[0].Text = (listView1.Items.Count).ToString();
this.listView1.Items[0].SubItems[1].Text = dq_bt;
this.listView1.Items[0].SubItems[2].Text = dq_jg;
this.listView1.Items[0].SubItems[3].Text = dq_xy;
this.listView1.Items[0].SubItems[4].Text = dq_qf;
this.listView1.Items[0].SubItems[5].Text = dq_ddxx;
this.listView1.Items[0].SubItems[6].Text = "下单";
//this.listView1.Items[0].SubItems[0].BackColor = Color.SkyBlue;
cj.xwb(Application.StartupPath + "\\订单数据库.txt", dq_ddxx + "|" + dq_jg);
AppendText(Color.Black, DateTime.Now.ToString() + " 新订单:" + dq_ddxx + "|" + dq_jg);
if (报警.Checked)
{
SoundPlayer s = new SoundPlayer(Application.StartupPath + "\\报警.wav");
s.Play();
}
}
Monitor.Exit(this); //退出
}
}
}
}
} |