System.Timers.Timer timer=new System.Timers.Timer(); private void Window_Loaded(object sender, System.Windows.RoutedEventArgs e) { this.WindowState = System.Windows.WindowState.Minimized; timer.Interval = 5 * 1000; timer.Enabled = true; timer.AutoReset = true; timer.Start(); } void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { try { timer.Enabled = false; this.WindowState = System.Windows.WindowState.Normal; ..... timer.Enabled = true; timer.Start(); } catch (Exception ex) { Logger.Log("OnTimer Error:" + ex.Message); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)