c# - Designing gui, how to update several controls from collection of variables -
I am now developing a GUI (or HMI) for a manufacturing machine for almost a year. I <...
There are approximately 5000 parameters in the machine that Gui needs access to access.
I currently have a daemon thread that collects all the variables from the machine in the form of all major datbones and parses them and put them in a list on Gui.
I collect, update and parse everything in less than 40ms, which is less than the required update frequency of 1 second, so I understand it properly.
How to update the problem in the actual GUI. Since I can only update the control on the thread on which it has been created. Im is currently using a different thread looping through all the controls and then using BeginInvoke (winform) or Dispatcher (wpf) to update everything for the user, it is very complicated for me.
Is there someone who has done something similar or another great way to update Guy?
Thank you!
Try to use background worker
DoWork collects data in the event and pass it together with the progress of the report or in the results all at once. This saves you the need to use Invoke.
Comments
Post a Comment