/// <summary> /// Stops SecondStopwatch, resets its elapsed time and resets <see cref="SecondStopwatchElapsedTime"/> /// </summary> public void StopSecondStopwatch() { if (SecondStopwatch.IsRunning) { SecondStopwatch.Stop(); TimeSpan timeSpan = SecondStopwatch.Elapsed; string temporaryStorage = String.Format("{0:00}:{1:00}:{2:00}:{3:00}", timeSpan.Hours, timeSpan.Minutes, timeSpan.Seconds, timeSpan.Milliseconds / 10); ElapsedTimeSecondStopwatchList.Add(temporaryStorage); SecondStopwatch.Reset(); FirstStopwatchElapsedTime = "00:00:00:00"; } else if (!SecondStopwatch.IsRunning) { TimeSpan timeSpan = SecondStopwatch.Elapsed; string temporaryStorage = String.Format("{0:00}:{1:00}:{2:00}:{3:00}", timeSpan.Hours, timeSpan.Minutes, timeSpan.Seconds, timeSpan.Milliseconds / 10); ElapsedTimeFirstStopwatchList.Add(temporaryStorage); SecondStopwatch.Reset(); SecondStopwatchElapsedTime = "00:00:00:00"; } }
public void EmptySecondStopwatchList() { ElapsedTimeSecondStopwatchList.Clear(); }