Example #1
0
 private void Set_Click(object sender, RoutedEventArgs e)
 {
     isStop      = true;
     startedTime = DateTime.Now;
     ProgressControl.SetBarLength(0.0);
     ProgressAmount = 0.0;
     setCount++;
     txtSet.Text += "Set: " + setCount + "   Seconds: " + timePassed.Seconds + "   Minutes: " + timePassed.Minutes + "\n";
 }
Example #2
0
 //This makes the circle timer reset when it reaches a full circle as well as as the timesTicked
 //which is essentially how much time has passed in an instance
 private void dispatcherTimer_Tick(object sender, object e)
 {
     timesTicked++;
     ProgressControl.SetBarLength(ProgressAmount);
     ProgressAmount += (1.0 / 60.0) * (7.95 / 60.0);
     if (ProgressAmount > 1.0)
     {
         ProgressAmount = 0.0;
     }
 }
Example #3
0
 public void HandleTimerTick(Object state)
 {
     lock (LockObject)
     {
         ProgressControl.SetBarLength(ProgressAmount);
         ProgressAmount += 0.006;
         if (ProgressAmount > 1.5)
         {
             ProgressAmount = 0.0;
         }
     }
 }
Example #4
0
        private void Start_Click(object sender, RoutedEventArgs e)
        {
            if (isStop == false)
            {
                isStop      = true;
                startedTime = DateTime.Now;
                DispatcherTimerSetup();

                Start.Content = "End Workout";
            }
            else
            {
                isStop = false;
                dispatcherTimer.Stop();
                demoDispatcher.Stop();
                Hour.Text     = "0:00:00";
                Start.Content = "Start Workout";
                ProgressControl.SetBarLength(0.0);
                ProgressAmount = 0.0;
            }
        }
Example #5
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     base.OnNavigatedTo(e);
     ProgressControl.SetBarLength(1.0);
 }