日期:2014-05-18 浏览次数:20850 次
public partial class PhotoMain : Form { /开始执行 private void button_ceshi_Click(object sender, EventArgs e) { GETI premierLeague = new GETI(); Thread threads = new Thread(delegate() { premierLeague.sss(); }); threads.Name = "PremierLeague"; threadlist.Add(threads); threads.Start(); } delegate void PhotoSta(string PhotoSum, string ImgSum, string CJ); /// <summary> /// 更新状态栏 /// </summary> public void ThisKeyWords(string PhotoSum, string ImgSum, string CJ) { lock (thisLock) { try { if (this.statusBar_Photo.InvokeRequired) { PhotoSta d = new PhotoSta(ThisKeyWords); this.Invoke(d, new object[] { PhotoSum, ImgSum, CJ }); } else { if (PhotoSum != null) { this.statusBar_Photo.Panels[0].Text = PhotoSum; } if (ImgSum != null) { this.statusBar_Photo.Panels[1].Text = ImgSum; } if (CJ != null) { this.statusBar_Photo.Panels[2].Text = CJ; } } } catch (Exception ex) { error.LogError("Photo更新状态栏出错:", ex); } } } } public class GETI { public void sss() { PhotoMain ww = new PhotoMain(); ww.ThisKeyWords(null, null, "显示停止!"); } }