async void UpdateTeamList()
        {
            busyIcon.IsVisible = true;
            busyIcon.IsRunning = true;
            ParseQuery <ParseObject> query  = ParseObject.GetQuery("TeamData");
            ParseQuery <ParseObject> sorted = query.OrderBy("teamNumber");

            var allTeams = await sorted.FindAsync();

            teamStack.Children.Clear();
            foreach (ParseObject obj in allTeams)
            {
                await obj.FetchAsync();

                TeamListCell cell = new TeamListCell();
                cell.teamName.Text = "Team " + obj ["teamNumber"];
                teamStack.Children.Add(cell);
                TapGestureRecognizer tap = new TapGestureRecognizer();
                //teamObj [i] = obj;
                tap.Tapped += (object sender, EventArgs e) => {
                    Navigation.PushModalAsync(new RobotInfoViewPage(obj));
                    //nextPage(teamObj[i]);
                };
                cell.GestureRecognizers.Add(tap);
                i++;
            }
            busyIcon.IsVisible = false;
            busyIcon.IsRunning = false;
        }
Exemplo n.º 2
0
        async void UpdateTeamList()
        {
            ParseQuery <ParseObject> query  = ParseObject.GetQuery("MatchData");
            ParseQuery <ParseObject> sorted = query.OrderBy("teamNo");
            ParseQuery <ParseObject> filter = sorted.WhereEqualTo("teamNo", 41);

            var allTeams = await filter.FindAsync();

            teamStack.Children.Clear();
            foreach (ParseObject obj in allTeams)
            {
                await obj.FetchAsync();

                TeamListCell cell = new TeamListCell();
                cell.teamName.Text = "Match " + obj ["matchNo"];
                teamStack.Children.Add(cell);
            }
        }
		async void UpdateTeamList(){
			busyIcon.IsVisible = true;
			busyIcon.IsRunning = true;
			ParseQuery<ParseObject> query = ParseObject.GetQuery("TeamData");
			ParseQuery<ParseObject> sorted = query.OrderBy("teamNumber");

			var allTeams = await sorted.FindAsync();
			teamStack.Children.Clear();
			foreach (ParseObject obj in allTeams) {
				await obj.FetchIfNeededAsync ();
				TeamListCell cell = new TeamListCell ();
				cell.teamName.Text = "Team " + obj ["teamNumber"];
				teamStack.Children.Add (cell);
				TapGestureRecognizer tap = new TapGestureRecognizer ();
				tap.Tapped += (object sender, EventArgs e) => {
					Navigation.PushModalAsync (new PitScoutingEditPage (obj));
				};
				cell.GestureRecognizers.Add (tap);
			}
			busyIcon.IsVisible = false;
			busyIcon.IsRunning = false;
		}
		async void UpdateTeamList(){
			ParseQuery<ParseObject> query = ParseObject.GetQuery("MatchData");
			ParseQuery<ParseObject> sorted = query.OrderBy("teamNo");
			ParseQuery<ParseObject> filter = sorted.WhereEqualTo ("teamNo", 41);

			var allTeams = await filter.FindAsync();
			teamStack.Children.Clear();
			foreach (ParseObject obj in allTeams) {
				await obj.FetchAsync ();
				TeamListCell cell = new TeamListCell ();
				cell.teamName.Text = "Match " + obj ["matchNo"];
				teamStack.Children.Add (cell);
			}
		}