Changeset 1507


Ignore:
Timestamp:
1/12/2010 6:09:56 AM (5 years ago)
Author:
lowjoel
Message:

When displaying the estimated amount of time left to finish the target round the values to seconds (since the new algorithm is accurate down to ticks)

Location:
branches/eraser6/SpeedMeter/Eraser
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/SpeedMeter/Eraser/ProgressForm.cs

    r1503 r1507  
    8181 
    8282            if (target.Progress.TimeLeft >= TimeSpan.Zero) 
    83                 timeLeft.Text = S._("About {0:T} left", target.Progress.TimeLeft); 
     83                timeLeft.Text = S._("About {0} left", RoundToSeconds(target.Progress.TimeLeft)); 
    8484            else 
    8585                timeLeft.Text = S._("Unknown"); 
     
    187187            return result.ToString(); 
    188188        } 
     189 
     190        private TimeSpan RoundToSeconds(TimeSpan span) 
     191        { 
     192            return new TimeSpan(span.Ticks - span.Ticks % TimeSpan.TicksPerSecond); 
     193        } 
    189194    } 
    190195} 
  • branches/eraser6/SpeedMeter/Eraser/Strings.NL.resx

    r1485 r1507  
    157157    <value>{0} van {1}</value> 
    158158  </data> 
    159   <data name="About {0:T} left" xml:space="preserve"> 
     159  <data name="About {0} left" xml:space="preserve"> 
    160160    <value>(Untranslated)</value> 
    161161  </data> 
  • branches/eraser6/SpeedMeter/Eraser/Strings.en.resx

    r1485 r1507  
    157157    <value>{0} out of {1}</value> 
    158158  </data> 
    159   <data name="About {0:T} left" xml:space="preserve"> 
    160     <value>About {0:T} left</value> 
     159  <data name="About {0} left" xml:space="preserve"> 
     160    <value>About {0} left</value> 
    161161  </data> 
    162162  <data name="Unknown" xml:space="preserve"> 
  • branches/eraser6/SpeedMeter/Eraser/Strings.it.resx

    r1485 r1507  
    157157    <value>{0} di {1}</value> 
    158158  </data> 
    159   <data name="About {0:T} left" xml:space="preserve"> 
    160     <value>Circa {0:T} rimasti</value> 
     159  <data name="About {0} left" xml:space="preserve"> 
     160    <value>Circa {0} rimasti</value> 
    161161  </data> 
    162162  <data name="Unknown" xml:space="preserve"> 
  • branches/eraser6/SpeedMeter/Eraser/Strings.resx

    r1485 r1507  
    157157    <value>{0} out of {1}</value> 
    158158  </data> 
    159   <data name="About {0:T} left" xml:space="preserve"> 
    160     <value>About {0:T} left</value> 
     159  <data name="About {0} left" xml:space="preserve"> 
     160    <value>About {0} left</value> 
    161161  </data> 
    162162  <data name="Unknown" xml:space="preserve"> 
Note: See TracChangeset for help on using the changeset viewer.