Exemplo n.º 1
0
        public void StartNewPomodoros(ItemCollection tags)
        {
            int      minutes = 25;
            DateTime date    = new DateTime();

            date      = date.AddMinutes(minutes);
            this.time = date;
            this.tags = tags;
            string libelle = ((Tag)tags[0]).Libelle;

            this.tag.Content = libelle;

            Pomodoro pomodoro = new Pomodoro()
            {
                Libelle = libelle,
                Date    = DateTime.Now
            };
            PomodorosDataAccess pomodoroDataAccess = new PomodorosDataAccess();

            pomodoroDataAccess.SavePomodoro(pomodoro);

            this.btn1.Content = "❚❚";
            this.pause        = false;
            this.start        = true;
        }
Exemplo n.º 2
0
        private void SaveNextPomodoro()
        {
            this.start = true;
            Tag tag = new Tag()
            {
                Libelle = "Work"
            };

            if (this.tags.MoveCurrentToNext())
            {
                tag = ((Tag)this.tags.CurrentItem);
            }
            this.tag.Content = tag.Libelle;
            PomodorosDataAccess pomodorosDataAccess = new PomodorosDataAccess();
            Pomodoro            pomodoro            = new Pomodoro()
            {
                Libelle = tag.Libelle,
                Date    = DateTime.Now
            };

            pomodorosDataAccess.SavePomodoro(pomodoro);
        }