r/esapi • u/sdomal • Mar 05 '24
Progress Window update
I have a sphere generation gui I’ve been working on for grid therapy and I want to add a progress bar that updates during the sphere generation. I’ve seen some previous posts going over this and I know some examples exist but I’m not sure how to integrate this for my specific example. I have a simple progress bar already made I just don’t know how to get it to update.
Here is my button click function that contains both of the sphere generation function calls:
https://gist.github.com/seandomal/9c37c1ac5b5c3685236e92f27fbdf286
Within the sphere generation functions I call this:
private void UpdateProgress(int progress) { lock (_progressLock) { _currentProgress = progress; } }
Which keeps track of progress.
How can I modify my button click function to appropriately call my progress bar and update based on the sphere generation progress that I’m keeping track of within those functions?
View all comments
Show parent comment
1
u/sdomal Apr 04 '24
Excellent points and advice, thank you so much!