Proper way of doing Progress Bars C# -


i have big project (30ish developed classes) , want make loading bar it. have current progress , total progress bars. have describe happening during current process.

the way did manually (haters gonna hate) go through greedy process , did estimations of how long gonna take (when loop, step ups each iteration).

i read background_worker more smoother, read on, appeared me still have go every chunk of code , want increment progress bar (the idea have do describe process made sense me).

so question was: there way sort of encapsulate method in "block", automatically allocate progress bar times? or there more efficient way i'm doing?

the best way put main processing in different thread not overload gui doesn't freeze (user frustration) , progress bar in gui thread (or make thread bar, too). depends on preference.

but never!! freeze ui. users think dead , try force close it.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -