public async void OnDoQuestionairClickedDiarySummary(object sender, EventArgs e) { string praticeId = ""; bool hasBeenEvaluated = false; for (int i = 0; i < ButtonAndTrainingList.Count; i++) { if (ButtonAndTrainingList[i].TrainingButton == (Button)sender || ButtonAndTrainingList[i].TrainingButton2 == (Button)sender) { praticeId = ButtonAndTrainingList[i].TrainingID; hasBeenEvaluated = ButtonAndTrainingList[i].HasBeenEvaluated; } } if (hasBeenEvaluated == false) { await Navigation.PushModalAsync(new Loading()); QuestionPage qp = new QuestionPage(praticeId); await QuestionPage.LoadQuestions(qp); Navigation.PopModalAsync(); //NavigationPage np = new NavigationPage(qp); //np.BarBackgroundColor = Color.FromHex("3d3d4a"); //np.BackgroundColor = Color.FromHex("3d3d4a"); await Navigation.PushModalAsync(qp); } }
static public async Task LoadQuestions(QuestionPage qp) { string questionData = await Database.GetQuestionsForTeamID(Database.CurrentAthlete.TeamID.ToString()); LabelList.Clear(); DescriptionList.Clear(); IdList.Clear(); string[] questions = questionData.Split(','); int labelListCount = 0; for (int i = 2; i < questions.Length - 1; i += 3) { //qp.LabelList[labelListCount].Text = questions[i]; LabelList.Add(questions[i]); DescriptionList.Add(questions[i - 1]); IdList.Add(questions[i - 2]); labelListCount++; } }
public AddInjuryPage(QuestionPage aQuesitonPage) { InitializeComponent(); CurrentaQuesitonPage = aQuesitonPage; for (int i = 0; i < Database.InjuryLabelList.Count; i++) { InjuryList.Add(Database.InjuryLabelList[i]); } //InjuryList.Add("Leg"); //InjuryList.Add("Arm"); //InjuryList.Add("Left Arm"); //InjuryList.Add("Right Arm"); //InjuryList.Add("Knee"); //InjuryList.Add("Shoulder"); //InjuryList.Add("But"); UpdateInjuryList(SearchTermEntry.Text); Entry e = (Entry)ButtonStackLayout.Children[0]; e.TextChanged += OnInjuryTextFeildChanged; }