/// <summary> /// Converts time to treat from seconds to format xx:xx /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void TimeToTreat_B_Click(object sender, RoutedEventArgs e) { int time = Convert.ToInt32(TimeToTreat_TB.Text); int minutes = time / 60; int seconds = time % 60; string timer = ""; if (minutes <= 9) { timer += string.Join("", "0"); } timer += string.Join("", minutes); timer += string.Join("", ":"); if (seconds <= 9) { timer += string.Join("", "0"); } timer += string.Join("", seconds); TimeRemaining_TB.Text = Convert.ToString(timer); countDownTimer.SetTime(time); }
public void SetTime(int seconds) { _uut.SetTime(seconds); Assert.AreEqual(seconds, _uut.RemainingTime); }