简单的就是四步走
DispatcherTimer dptimer = new DispatcherTimer(); //首先是实例化一个定时器
dptimer.Tick += Dptimer_Tick; //定时器在某个时间内执行的事件
dptimer.Interval = TimeSpan.FromMilliseconds(100000); //定时器,定时间隔为多少毫秒 ,可以通过TimeSpan来改变
dptimer.Start(); //然后就是启动
private void Dptimer_Tick(object sender, EventArgs e)
{
//这里就是写时间到了之后你要执行的方法
RefMenuItem_Click(this, null);
}
怎么样!是不是很简单!哈哈哈哈