Whenever I want to modify a winform from another thread, I need to use
->Invoke(delegate, params)
so that the modification occurs in the winform's own thread.
For every function that needs to modify the gui, I need another delegate function.
Is there some scheme which allows me to limit the number of delegate functions needed? I have a controller class which handles the whole gui in one spot, I've thought about reusing delegates but that smells badly.
I think that my question can apply to all languages where winform can run
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…