private void StopPomodoro() { _timer.Stop(); _timerIsRunning = false; BackgroundAudioPlayer.Instance.Pause(); // Todo - dialog box to test user wants to stop _currentPomodoro = null; // todo - switch between timer and break timer? ToggleButton.Content = "Start"; if (ScheduledActionService.Find("Break_Over") != null) { ScheduledActionService.Remove("Break_Over"); } Reminder r = new Reminder("Break_Over"); r.Title = "Back To Work"; r.Content = "Break's Over!"; r.BeginTime = DateTime.Now.AddSeconds(10); r.NavigationUri = NavigationService.CurrentSource; ScheduledActionService.Add(r); }
private void StartPomodoro() { if (_currentPomodoro == null) { _currentPomodoro = new Pomodoro(); } _timer.Start(); BackgroundAudioPlayer.Instance.Play(); }
private void RestoreState() { object outVal; if (_isoSettings.TryGetValue( "CurrentPomodoro", out outVal )) { _currentPomodoro = outVal as Pomodoro; if (_currentPomodoro != null) { _timerIsRunning = true; StartStopPomodoro(); } } if (_isoSettings.TryGetValue( "TaskList", out outVal )) { _taskList = outVal as List<string>; SetTaskList(); } }
private void RestoreState() { object outVal; if (_isoSettings.TryGetValue("CurrentPomodoro", out outVal)) { _currentPomodoro = outVal as Pomodoro; if (_currentPomodoro != null) { _timerIsRunning = true; StartStopPomodoro(); } } if (_isoSettings.TryGetValue("TaskList", out outVal)) { _taskList = outVal as List <string>; SetTaskList(); } }
private void StopPomodoro() { _timer.Stop(); _timerIsRunning = false; BackgroundAudioPlayer.Instance.Pause(); // Todo - dialog box to test user wants to stop _currentPomodoro = null; // todo - switch between timer and break timer? ToggleButton.Content = "Start"; if (ScheduledActionService.Find( "Break_Over" ) != null) { ScheduledActionService.Remove("Break_Over"); } Reminder r = new Reminder("Break_Over"); r.Title = "Back To Work"; r.Content = "Break's Over!"; r.BeginTime = DateTime.Now.AddSeconds(10); r.NavigationUri = NavigationService.CurrentSource; ScheduledActionService.Add(r); }