Ejemplo n.º 1
0
        public static Uri MakeTaskEditViewUri ( Task task ) 
        { 
            string uri = string.Format ( "/Views/Task/EditTaskView.xaml?{0}={1}", 
                    TaskIdQueryParam, task.Id);

            return new Uri(uri, UriKind.Relative); 
        }
Ejemplo n.º 2
0
		/// <summary>
		/// Go through the directories in the DirectorySearch
		/// to build a TaskTable of all the tasks found.
		/// </summary>
		public void BuildTable()
		{
			var tasks = new List<Task> ();

			// Every file
			foreach (string x in TaskDir.Files) {
				//Every line
				foreach (string line in File.ReadAllLines(x)) {

					//If it's a task
					if (line.Contains (Key) && line.Contains (":")) {

						//Make it a task, remember its file, and add it to the list
						var temp = new Task (Key, line);
						temp.Metadata.Associate ("file", x);
						tasks.Add (temp);
					}
				}
			}

			//Add these tasks to the existing TaskTable
			Tasks.Tasks.AddRange (tasks);
		}
Ejemplo n.º 3
0
 partial void DeleteItems(Task instance);
Ejemplo n.º 4
0
 partial void UpdateItems(Task instance);
Ejemplo n.º 5
0
 partial void InsertItems(Task instance);
Ejemplo n.º 6
0
 private void detach_Items(Task entity)
 {
     this.SendPropertyChanging();
     entity.Projects = null;
 }
Ejemplo n.º 7
0
 private void attach_Items(Task entity)
 {
     this.SendPropertyChanging();
     entity.Projects = this;
 }
Ejemplo n.º 8
0
		/// <summary>
		/// Creates a TaskTable with one initial task.
		/// </summary>
		/// <param name="initialTask">The initial task</param>
		public TaskTable(Task initialTask)
		{
			Tasks = new List<Task> ();
			Tasks.Add (initialTask);
		}
Ejemplo n.º 9
0
		/// <summary>
		/// GenerateContract will generate a list of tasks that
		/// need to be completed in order for the provided task with
		/// dependencies provides to be considered complete
		/// </summary>
		/// <returns>The contract</returns>
		/// <param name="t">The task to generate the contract of.</param>
		public string[] GenerateContract(Task t)
		{
			List<string> contract = new List<string> ();

			List<Task> dependencies = ResolveDependencies (t.Fetch("name").Get(0));

			//Reversing the dependencies should get the dependencies with the least
			// amount of dependencies themself
			dependencies.Reverse ();

			foreach (Task task in dependencies)
				contract.Add (task.Text);
			
			contract.Add (t.Text);
			return contract.ToArray();
		}
Ejemplo n.º 10
0
 public static Uri MakeReminderUri(Task task)
 {
     return new Uri ( 
         string.Format ( "/Views/Task/TaskView.xaml?{0}={1}&{2}={3}" , 
                TaskIdQueryParam, task.Id.ToString(), FromQueryParam, ReminderQueryParam ) 
         , UriKind.Relative);
 }
Ejemplo n.º 11
0
 public static Uri MakeTaskViewUri ( Task task )
 { 
     return new Uri ( 
         string.Format ( "/Views/Task/TaskView.xaml?{0}={1}", 
                 TaskIdQueryParam,  task.Id ), UriKind.Relative);
 }