// Toggle items as completed when tapped private void OnTap (ListItem task) { AppDelegate.AddActivity(); task.Completed = !task.Completed; this.db.UpdateAsync (task).ContinueWith (t => { Refresh(); AppDelegate.FinishActivity(); }); }
// Create an item an add it to the list private void CreateItem (string text) { ListItem listItem = new ListItem { Text = text, ListId = this.list.Id }; AppDelegate.AddActivity(); this.db.InsertAsync (listItem).ContinueWith (t => { AppDelegate.FinishActivity(); Refresh(); }); }