//----------------------------------------------------------------------------------------------------------------------------------------------// private void GetBucketTeamProject() { DataRef.Projects("(Bucket NZ) Bucket Team").GetValueAsync().ContinueWith(async(task) => { await new WaitForUpdate(); DataSnapshot snapshot = task.Result; string pName = snapshot.Child("ProjectName").Value.ToString(); string gName = snapshot.Child("Group").Value.ToString(); string pRef = "(" + gName + ") " + pName; string description = snapshot.Child("ProjectDescription").Value.ToString(); string fundingGoal = snapshot.Child("FundingGoal").Value.ToString(); string fundingAmount = snapshot.Child("FundingAmount").Value.ToString(); string location = snapshot.Child("Tags").Child("Location").Value.ToString(); string pictureID = snapshot.Child("PictureID").Value.ToString(); List <string> categories = new List <string> (); foreach (DataSnapshot snap in snapshot.Child("Tags").Child("Categories").Children) { categories.Add(snap.Value.ToString()); } List <string> goalTitles = new List <string> (); foreach (DataSnapshot s2 in snapshot.Child("Measurements").Children) { goalTitles.Add(s2.Child("Title").Value.ToString()); } List <string> goalValues = new List <string> (); foreach (DataSnapshot s3 in snapshot.Child("Measurements").Children) { goalValues.Add(s3.Child("Value").Value.ToString()); } bucketTeam.SetInformation(pRef, gName, pName, description, fundingGoal, fundingAmount, location, categories, goalTitles, goalValues, pictureID); }); }