//<--- there is a code for the task above that runs all task
await Task.WhenAll(uploadTasks);
//decides how often should the system give a feedback every 10000 Files
runnerctr = 0;
//10.000 steps
int runner = 0;
// Loop that checks out hwo is process doing
while (runner < int.Parse(File_Upload_Count_Simu.Text))
{
//wait for some time before updating
await Task.Delay(TimeSpan.FromSeconds(5));
// loop through all tasks and update the counter for all done uploads(tasks)
foreach (var task in uploadTasks)
{
if (task.IsCompleted)
{
runner++;
}
}
// get progress every 10000 tasks which are done
if (runner >= runnerctr + 10000)
{
runnerctr += 10000;
UpdateRichTextBox("do something");
}
}
//<--- there is a code for the task above that runs all task
await Task.WhenAll(uploadTasks);
//decides how often should the system give a feedback every 10000 Files
runnerctr = 0;
//10.000 steps
int runner = 0;
// Loop that checks out hwo is process doing
while (runner < int.Parse(File_Upload_Count_Simu.Text))
{
//wait for some time before updating
await Task.Delay(TimeSpan.FromSeconds(5));
// loop through all tasks and update the counter for all done uploads(tasks)
foreach (var task in uploadTasks)
{
if (task.IsCompleted)
{
runner++;
}
}
// get progress every 10000 tasks which are done
if (runner >= runnerctr + 10000)
{
runnerctr += 10000;
UpdateRichTextBox("do something");
}
}