public TimerViewModel() { timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromMilliseconds(stepInMs); timer.Tick += Timer_Tick; StartCurrentTimer = new RelayCommand(Start); StopCurrentTimer = new RelayCommand(Stop); DeleteAllTimer = new RelayCommand(Delete); AddPointInList = new RelayCommand(AddPoint); CurrentTime = new RunningTime(); RunningTimes = new ObservableCollection <RunningTime>(); }
void Delete() { timer?.Stop(); CurrentTime = new RunningTime(); RunningTimes = new ObservableCollection <RunningTime>(); }