Timers in WPF
There are times when you need a task to execute periodically. There are two ways of achieving this: Use the System.Windows.Threading. DispatcherTimer Use the System.Threading. Timer Say now that you want to implement a class the executes DoSomething() periodically and also informs through a delegate to whoever listens whent the execution is performed. The class for DispatcherTimer is as follows: public class DTimer { private DispatcherTimer timer; public event Action < int > DoSomething; private int _timesCalled
Διαβάστε περισσότερα »