Exemplo n.º 1
0
        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>();
        }
Exemplo n.º 2
0
 void Delete()
 {
     timer?.Stop();
     CurrentTime  = new RunningTime();
     RunningTimes = new ObservableCollection <RunningTime>();
 }