public object[] GetRowObjects(TaskRegistration taskReg)
 {
     return new object[]
     {
         taskReg.ProcessName,
         taskReg.TaskName,
         this.GetFormattedDuration(taskReg.Duration)
     };
 }
        private void AddTaskRegistration(TaskRegistration newTask, DateTime endTime)
        {
            // calculate duration of previous task and register it.
            if (this.currentlyActiveTask != null && !string.IsNullOrEmpty(this.currentlyActiveTask.TaskName))
            {
                this.currentlyActiveTask.TimeStamp = taskStart;
                this.currentlyActiveTask.Duration = endTime - taskStart;

                this.PomodoroRegistrations.Add(currentlyActiveTask);
            }

            // now we have a new task running.
            this.taskStart = this.Now;
            this.currentlyActiveTask = newTask;
        }