|
-
Apr 10th, 2007, 08:49 AM
#10
Fanatic Member
Re: Calculating Progress
The Time consumed reading is relativly little compared to the additem
If that is true, first write the algorithm that adds all the items. Then, just copy it and replace the AddItem line with ++Count, or whatever, and run it before you add the items. Then change the AddItem algo to keep up with how many have been added, and display the percentage. The only way to know how many items you will be adding is to go through the file first.
Although, I must say this sounds a little strange to me. It will slow down the program (at least a little). However, if you are confident that it won't slow it down significantly, and the user knowing the status of the loading is that important, then go for it.
VB.Net 2008
.Net Framework 2.0
"Must you breathe? 'Cause I need heaven..."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|