Timer timer1;
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
private void timer1_Tick(object sender, EventArgs e)
{
ArrayList AutoTask = new ArrayList();
AutoTask.Add("8:30:00");
AutoTask.Add("9:30:00");
AutoTask.Add("10:30:00");
AutoTask.Add("11:30:00");
for (int n = 0; n < 4; n++)
{
if (dtAuto.ToLongTimeString().Equals(AutoTask[n]))
{
MessageBox.Show("现在时间是" + AutoTask[n]);
}
}
}
本文介绍了一个简单的定时任务提醒系统的实现方法。通过设置定时器,在指定的时间点触发事件并弹出消息框通知用户。该系统定义了四个特定时间点的任务提醒。
2870

被折叠的 条评论
为什么被折叠?



