コード例 #1
0
 private bool TimeTick()
 {
     if (isOn)
     {
         timeLabel_.Text      = TimeParser.ReduceTime(timeLabel_.Text);
         statusBar_.Progress -= (double)1 / workout_.TimeToNext;
         if (statusBar_.Progress <= 0)
         {
             LoadNext();
             return(false);
         }
     }
     return(isOn);
 }
コード例 #2
0
 private void ExerciseTimer()
 {
     frameExercise.BackgroundColor = colorExercising;
     if (IsSoundOn)
     {
         sound_.PlayGo();
     }
     timer = workout_.Duration;
     Device.StartTimer(TimeSpan.FromSeconds(1), () =>
     {
         timer--;
         labelExerciseTime.Text = TimeParser.ReduceTime(labelExerciseTime.Text);
         if (timer == 0)
         {
             BreakTimer();
             return(false);
         }
         return(isOn);
     });
 }