Ignore:
Timestamp:
6/19/2010 2:48:37 AM (4 years ago)
Author:
lowjoel
Message:

Allow tasks to report that their progress is indeterminate, and reflect this in the UI appropriately.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser/Eraser/ProgressForm.cs

    r2190 r2203  
    165165                timeLeft.Text = S._("Unknown"); 
    166166 
    167             if (targetProgress.Progress >= 0.0f) 
     167            if (!targetProgress.ProgressIndeterminate) 
    168168            { 
    169169                itemProgress.Style = ProgressBarStyle.Continuous; 
     
    178178            } 
    179179 
    180             overallProgress.Value = (int)(task.Progress.Progress * 1000); 
    181             overallProgressLbl.Text = S._("Total: {0,2:#0.00%}", task.Progress.Progress); 
     180            if (!task.Progress.ProgressIndeterminate) 
     181            { 
     182                overallProgress.Style = ProgressBarStyle.Continuous; 
     183                overallProgress.Value = (int)(task.Progress.Progress * 1000); 
     184                overallProgressLbl.Text = S._("Total: {0,2:#0.00%}", task.Progress.Progress); 
     185            } 
     186            else 
     187            { 
     188                overallProgress.Style = ProgressBarStyle.Marquee; 
     189                overallProgressLbl.Text = S._("Total: Unknown"); 
     190            } 
    182191        } 
    183192 
Note: See TracChangeset for help on using the changeset viewer.