public void CreateTask ()
		{
			// first, add the task to the underlying data
			var newId = chores[chores.Count - 1].Id + 1;
			var newChore = new Chore(){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);
		}
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 Chore()
            {
                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);
        }
		public void DeleteTask (Chore chore)
		{
			var oldTask = chores.Find(t => t.Id == chore.Id);
			chores.Remove (oldTask);
			NavigationController.PopViewController(true);
		}
		public void SaveTask (Chore chore)
		{
			//var oldTask = chores.Find(t => t.Id == chore.Id);
			NavigationController.PopViewController(true);
		}
		string cellIdentifier = "taskcell"; // set in the Storyboard

		public RootTableSource (Chore[] items)
		{
			tableItems = items; 
		}
 // this will be called before the view is displayed
 public void SetTask(MasterViewController d, Chore task)
 {
     Delegate = d;
     currentTask = task;
 }
 public void SaveTask(Chore chore)
 {
     //var oldTask = chores.Find(t => t.Id == chore.Id);
     NavigationController.PopViewController(true);
 }
Example #8
0
 // this will be called before the view is displayed
 public void SetTask(MasterViewController d, Chore task)
 {
     Delegate    = d;
     currentTask = task;
 }