爲什麼Vote();
函數不能在此計時器中運行?爲什麼函數不在這個定時器內運行?
消息框一個作品,但投一個沒有
public void Timer()
{
var timespan = new TimeSpan(0, 0, 20);
var timer = new System.Timers.Timer(timespan.TotalMilliseconds);
timer.Elapsed += (o, e) =>
{
MessageBox.Show("Worked");
Vote();
};
timer.Start();
}
投票是這樣的代碼中此功能,感謝,奧利弗以上。
提供'投票()'函數的代碼。 – 2012-02-27 05:48:44
當你點擊'MessageBox'的Ok'時它會運行嗎? – V4Vendetta 2012-02-27 05:49:00
是V4和Sai:http://pastebin.com/f1yKBCAH – user1233208 2012-02-27 05:53:17