Example #1
0
        public void DeleteTask(Chores chore)
        {
            var oldTask = chores.Find(t => t.Id == chore.Id);

            chores.Remove(oldTask);
            NavigationController.PopViewController(true);
        }
Example #2
0
        public void CreateTask()
        {
            // first, add the task to the underlying data
            var newId    = chores[chores.Count - 1].Id + 1;
            var newChore = new Chores {
                Id = newId
            };

            chores.Add(newChore);

            // then open the detail view to edit it
            var detail = Storyboard.InstantiateViewController("detail") as TaskDetailViewController;

            detail.SetTask(this, newChore);
            NavigationController.PushViewController(detail, true);
        }
 // this will be called before the view is displayed
 public void SetTask(ItemViewController d, Chores task)
 {
     Delegate    = d;
     currentTask = task;
 }
Example #4
0
        public void SaveTask(Chores chore)
        {
            var oldTask = chores.Find(t => t.Id == chore.Id);

            NavigationController.PopViewController(true);
        }