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); }
/// <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); }
partial void DeleteItems(Task instance);
partial void UpdateItems(Task instance);
partial void InsertItems(Task instance);
private void detach_Items(Task entity) { this.SendPropertyChanging(); entity.Projects = null; }
private void attach_Items(Task entity) { this.SendPropertyChanging(); entity.Projects = this; }
/// <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); }
/// <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(); }
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); }
public static Uri MakeTaskViewUri ( Task task ) { return new Uri ( string.Format ( "/Views/Task/TaskView.xaml?{0}={1}", TaskIdQueryParam, task.Id ), UriKind.Relative); }