public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
 {
     var task = _source.Tasks[indexPath.Row];
     task.Checked = !task.Checked;
     var manager = new TaskManager();
     manager.SaveTask(task);
 }
Ejemplo n.º 2
0
        private Task CreateNewListItem(string text)
        {
            var task = new Task() { 
                Text = text, 
                Checked = false, 
                CreationDate = DateTime.UtcNow 
            };

            var taskManager = new TaskManager();
            taskManager.SaveTask(task);

            return task;
        }
            public override void EditingEnded(UITextField textField)
            {
                if(textField.Text.Length == 0) {
                    return;
                }

                var task = new Task() { 
                    Text = textField.Text, 
                    Checked = false, 
                    CreationDate = DateTime.UtcNow 
                };

                var taskManager = new TaskManager();
                taskManager.SaveTask(task);
            }