0

I have a WPF application that continuously checks for internet connection, some devices connected to the computer and user iddleness on the application and notifies to the main window. So far it was implemented using windows forms timers. But it is slowing down the system.

Can you guys please suggest what would be the best way to implement the scenario ? Should I use any timer or should I use any threads ? Any reference or sample code will be much appriciated.

marifrahman
  • 681
  • 2
  • 13
  • 31
  • Can you show us a code of one of your timers? Maybe the problem here is the process within the timer. – DevEstacion Nov 19 '14 at 02:55
  • Starting w/.NET 4.0 and up, it's possibly via Task.Factory (and optionally, Dispatcher) as explained here: http://stackoverflow.com/questions/16161131/what-is-the-correct-way-to-update-the-ui-in-wpf-from-a-thread-dispatched-from-ta – Alexander Bell Nov 19 '14 at 03:14

0 Answers0