If you need an update for the entire application, and this does not cause too much delay for the update, the best option is to start the Thread background, which can trigger and send events to subscribers who have data (perhaps first check if it has changed using any then a certain logic, adding a custom EventArgs to the event).
For example, create an instance of this class somewhere at the top level (perhaps your main form code?):
using System; using System.Threading; using System.Windows.Forms; public class PollerThread { private Thread _thread; private SynchronizationContext _syncContext; public event EventHandler UpdateFinished; public PollerThread() { _syncContext = WindowsFormsSynchronizationContext.Current; ThreadStart threadStart = new ThreadStart(ThreadStartMethod); _thread = new Thread(threadStart); _thread.Name = "UpdateThread"; _thread.IsBackground = true; _thread.Priority = System.Threading.ThreadPriority.Normal; } public void Start() { if ((_thread.ThreadState & ThreadState.Unstarted) == ThreadState.Unstarted) _thread.Start(); else throw new Exception("Thread has already been started and may have completed already."); } public void ThreadStartMethod() { try { while (true) {
Sign each of the areas that should respond to new updates in the UpdateFinished event. This will be executed in the thread used to build the PollerThread class.
This answer may seem a bit loose and more specifically relates to window designs, but the usefulness really depends on your current implementation. At least you can build this anyway. Hope this helps :)
source share