async System.Threading.Tasks.Task Populate() { Title = "loading..."; Task ta = new Task(); try { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true; var query = ParseObject.GetQuery("Task").WhereEqualTo("objectId", task.Id); var t = await query.FirstAsync(); ta = Task.FromParseObject(t); } catch (ParseException pe) { Console.WriteLine("Parse Exception:{0}", pe.Message); } finally { Title = ""; // clear "loading..." message UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false; } // Populate UI controls titleText.Text = ta.Title ?? ""; descriptionText.Text = ta.Description ?? ""; doneSwitch.On = ta.IsDone; saveButton.Enabled = true; doneSwitch.Enabled = true; deleteButton.Enabled = true; }
public static async System.Threading.Tasks.Task <List <Task> > GetAll() { var query = ParseObject.GetQuery("Task").OrderBy("Title"); var ie = await query.FindAsync(); var tl = new List <Task> (); foreach (var t in ie) { tl.Add(Task.FromParseObject(t)); } return(tl); }
async System.Threading.Tasks.Task <Parse.Task> Populate() { Task ta = new Task(); try { var query = ParseObject.GetQuery("Task").WhereEqualTo("objectId", taskID); var t = await query.FirstAsync(); ta = Task.FromParseObject(t); } catch (ParseException pe) { Console.WriteLine("Parse Exception:{0}", pe.Message); } return(ta); }