private Timer t = new Timer();
void Event_Trigger(object sender, EventArgs e)
{
t.Interval = 4000;
t.Tick +=new EventHandler(t_Tick);
ShowNotificationForm();
t.Start();
}
void t_Tick(object sender, EventArgs e)
{
CloseNotificationForm();
t.Stop();
t.Dispose();
}
private void ShowNotificationForm()
{
//do or show something
}
private void CloseNotificationForm()
{
//End your work here
}
|