Пример #1
0
 public Task(DateTime date, string summary, string description, int priority, bool inprogress)
 {
     ID          = Task.GenerateRandomID();
     Date        = date;
     Summary     = summary;
     Description = description;
     Priority    = priority;
     InProgress  = inprogress;
     Worked      = new List <DateTime> ();
     Subtasks    = new List <Subtask> ();
 }
Пример #2
0
        internal void Load()
        {
            string path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);

            Load(Path.Combine(path, "tracker/tasks.xml"));
            // Necessary for backwords compatibility (updates old tasks.xml and adds IDs to each task).
            bool changed_ids = false;

            foreach (Task task in tasks)
            {
                if (task.ID == 0)
                {
                    changed_ids = true;
                    task.ID     = Task.GenerateRandomID();
                }
            }
            if (changed_ids)
            {
                this.Save();
            }
        }
Пример #3
0
 protected void OnAddSubtaskbtnClicked(object sender, EventArgs e)
 {
     subtaskList.AppendValues(false, "", Task.GenerateRandomID().ToString());
 }