Changeset 2190


Ignore:
Timestamp:
06/18/10 14:37:40 (4 years ago)
Author:
lowjoel
Message:

There's no need for the UpdateProgress? function to require a SteppedProgressManager?. The only thing that provides is a step name, which we can use a generic one if the progress class is not a SteppedProgressManager?.

Location:
trunk/eraser/Eraser
Files:
6 edited

Legend:

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

    r1808 r2190  
    5353            //Set the current progress 
    5454            if (task.Progress.CurrentStep != null) 
    55                 UpdateProgress((SteppedProgressManager)task.Progress.CurrentStep.Progress, 
     55                UpdateProgress(task.Progress.CurrentStep.Progress, 
    5656                    new ProgressChangedEventArgs(task.Progress.CurrentStep.Progress, null)); 
    5757        } 
     
    8282                return; 
    8383 
    84             SteppedProgressManager progress = target.Progress as SteppedProgressManager; 
    85             if (progress == null) 
    86                 return; 
    87  
    88             UpdateProgress(progress, e); 
     84            UpdateProgress(target.Progress, e); 
    8985        } 
    9086 
     
    144140        } 
    145141 
    146         private void UpdateProgress(SteppedProgressManager targetProgress, ProgressChangedEventArgs e) 
     142        private void UpdateProgress(ProgressManagerBase targetProgress, ProgressChangedEventArgs e) 
    147143        { 
    148144            TaskProgressChangedEventArgs e2 = (TaskProgressChangedEventArgs)e.UserState; 
    149             if (targetProgress.CurrentStep != null) 
    150                 status.Text = targetProgress.CurrentStep.Name; 
     145            { 
     146                SteppedProgressManager targetProgressStepped = 
     147                    targetProgress as SteppedProgressManager; 
     148                if (targetProgressStepped != null && targetProgressStepped.CurrentStep != null) 
     149                    status.Text = targetProgressStepped.CurrentStep.Name; 
     150                else 
     151                    status.Text = S._("Erasing..."); 
     152            } 
    151153 
    152154            if (e2 != null) 
  • trunk/eraser/Eraser/Strings.en.resx

    r2142 r2190  
    202202    <value>Close</value> 
    203203  </data> 
     204  <data name="Erasing..." xml:space="preserve"> 
     205    <value>Erasing...</value> 
     206  </data> 
    204207  <data name="{0} out of {1}" xml:space="preserve"> 
    205208    <value>{0} out of {1}</value> 
  • trunk/eraser/Eraser/Strings.it.resx

    r2154 r2190  
    202202    <value>Chiudi</value> 
    203203  </data> 
     204  <data name="Erasing..." xml:space="preserve"> 
     205    <value>(Untranslated)</value> 
     206  </data> 
    204207  <data name="{0} out of {1}" xml:space="preserve"> 
    205208    <value>{0} di {1}</value> 
  • trunk/eraser/Eraser/Strings.nl.resx

    r2142 r2190  
    202202    <value>Sluiten</value> 
    203203  </data> 
     204  <data name="Erasing..." xml:space="preserve"> 
     205    <value>(Untranslated)</value> 
     206  </data> 
    204207  <data name="{0} out of {1}" xml:space="preserve"> 
    205208    <value>{0} van {1}</value> 
  • trunk/eraser/Eraser/Strings.pl.resx

    r2142 r2190  
    202202    <value>Zamknij</value> 
    203203  </data> 
     204  <data name="Erasing..." xml:space="preserve"> 
     205    <value>(Untranslated)</value> 
     206  </data> 
    204207  <data name="{0} out of {1}" xml:space="preserve"> 
    205208    <value>{0} z {1}</value> 
  • trunk/eraser/Eraser/Strings.resx

    r2142 r2190  
    202202    <value>Close</value> 
    203203  </data> 
     204  <data name="Erasing..." xml:space="preserve"> 
     205    <value>Erasing...</value> 
     206  </data> 
    204207  <data name="{0} out of {1}" xml:space="preserve"> 
    205208    <value>{0} out of {1}</value> 
Note: See TracChangeset for help on using the changeset viewer.