public void Stop() { _timer.Stop(); NotifyOfPropertyChange(() => CanStart); NotifyOfPropertyChange(() => CanStop); NotifyOfPropertyChange(() => CanReset); }
private async void DelayIdleTimer(object sender, EventArgs e) { idleTimer.Stop(); speed = 0; idleWatch.Start(); OnActive(false); await progressBarSpeed.ProgressTo(0, 500, Easing.Linear); }
private async void ExecuteMainButtonCommand() { if (!_hasStarted) { _hasStarted = true; MainButtonText = "DONE"; _timer.Start(); } else { _timer.Stop(); await _navigationService.NavigateAsync("GamePage"); } }
private void ShowActions() { var actionForm = new ActionForm(); actionForm.ShowDialog(); switch (actionForm.ActionStateValue) { case ActionForm.ActionState.Stop: _timer.Stop(); break; case ActionForm.ActionState.Continue: _timer.Resume(); break; case ActionForm.ActionState.Minimize: ToggleVisibility(); break; case ActionForm.ActionState.Interruption: _session.Interruptions++; _timer.Pause(); break; } }
static void Main() { int i = 0; Console.WriteLine("Start timer result: " + i); CustomTimer t = new CustomTimer(delegate() { i++; Console.WriteLine(i); }, 500); t.Start(); // do some work for 2seconds Thread.Sleep((int)2000); t.Stop(); Console.WriteLine("Stop timer result: " + i); }
private void TimerTick() { _timeLeft--; Time = _timeLeft.ToString(); if (_timeLeft == 0) { _timer.Stop(); ShowStartBtn = false; RaisePropertyChanged("ShowPicker"); SelectedName = GlobalConfig.GenerateName(); } }
public void setActive(bool state) { isActive = state; if (turboMode) { if (state) { timer.Start(); } else { timer.Stop(); } } if (state && !turboMode) { PlaySound(); } }
private IEnumerator Start() { while (!MapboxAccess.Configured) { yield return(null); } var profiler = new CustomTimer().Start(); foreach (var tileId in _map.Tiles) { var tile = new CustomTile(transform, _map, in tileId); _imageFactory.Register(tile); // _meshFactory.Register(tile); } while (CoroutineManager.Count > 0) { yield return(null); } Debug.Log(profiler.ElapsedSeconds.ToString(CultureInfo.CurrentCulture)); profiler.Stop(); }
async void CPRIdle(object sender, EventArgs e) { timer.Stop(); speed = 0; await idleTimer.Start(); }
private void MenuItem_Click(object sender, System.Windows.RoutedEventArgs e) { CustomTimer.Stop(); }
private void MnuStop_Click(object sender, RoutedEventArgs e) { CustomTimer.Stop(); }
public void resetQuack() { timerB.Stop(); timerB.Start(); }
/// <summary> /// Stop timer on GameOver /// </summary> void OnGameOver() { GameTimer.Stop(); }