Пример #1
0
        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);
        }
Пример #2
0
 private void StartPomodoro()
 {
     if (_currentPomodoro == null)
     {
         _currentPomodoro = new Pomodoro();
     }
     _timer.Start();
     BackgroundAudioPlayer.Instance.Play();
 }
Пример #3
0
        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();
            }

        }
Пример #4
0
        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();
            }
        }
Пример #5
0
        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);
        }
Пример #6
0
 private void StartPomodoro()
 {
     if (_currentPomodoro == null)
     {
         _currentPomodoro = new Pomodoro();
     }
     _timer.Start();
     BackgroundAudioPlayer.Instance.Play();
 }