04.11.2014 Views

编程资料- 多线程 - 错误提示:发生了异常- 博客园

编程资料- 多线程 - 错误提示:发生了异常- 博客园

编程资料- 多线程 - 错误提示:发生了异常- 博客园

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

{<br />

//DateTime now = DateTime.Now;<br />

int i = DateTime.Now.Hour;<br />

if (i > 2 && i < 4)<br />

{<br />

myEvent = new myDelegate(UpUserState);<br />

myEvent += new myDelegate(UpCaiGou);<br />

// myEvent += new myDelegate(GetMoney);<br />

}<br />

//if (now.Hour == 3)<br />

//{<br />

// myEventB = new myDelegate(deltemp);<br />

//}<br />

//if (myEventA != null) myEventA();<br />

//if (myEventB != null) myEventB();<br />

if (myEvent != null)<br />

{<br />

myEvent();<br />

myEvent = null;<br />

}<br />

Application.DoEvents();<br />

}<br />

}<br />

Thread.Sleep(6000000); // 每 100 分 钟 检 查 一 次 时 间<br />

private void frmAutoMsg_FormClosing(object sender, FormClosin<br />

gEventArgs e)<br />

{<br />

if (canClosed == false)<br />

{<br />

e.Cancel = true;<br />

this.Hide();<br />

this.Visible = false;<br />

//this.<br />

}<br />

}<br />

private void menuItem2_Click(object sender, EventArgs e)<br />

{<br />

this.ShowInTaskbar = true;<br />

this.Show();<br />

this.Visible = true; // 恢 复 主 窗 体

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!