Ejemplo n.º 1
0
        /// <summary>
        /// Adds a new Task with a given description to the end of the list.
        /// </summary>
        /// <param name="taskDescription">A given Task descripiton</param>
        /// <param name="timeSpentInSeconds">A given Time spent in seconds</param>
        public void AddNewTask(string taskDescription, long timeSpentInSeconds)
        {
            Task newTask =
                new Task(GetNextTaskNumber(), taskDescription, timeSpentInSeconds, Form);

            Tasks.Add(newTask);

            // Update UI
            Form.Controls.Add(newTask.UI.TaskPanel);
            Form.AdjustFooter();
        }