110,539
社区成员
发帖
与我相关
我的任务
分享
public static void On(TimeSpan fromSeconds, Action action)
{
DispatcherTimer t = new DispatcherTimer() { Interval = fromSeconds };
t.Tick += (s, args) =>
{
action();
t.Stop();
};
t.Start();
}
Application.Current.Exit += new EventHandler(HandleApplicationExit);