public EditScorePopup(MyScores m, DetailedScore Score, ScoreClick PrevPage) { InitializeComponent(); mp = m; OriginalScore = Score; ScoreClick = PrevPage; SelectedScore.Text = Score.Score.ToString(); if (Score.RoundType == "Front") { SelectedRoundType.SelectedIndex = 1; } else if (Score.RoundType == "Back") { SelectedRoundType.SelectedIndex = 2; } else { SelectedRoundType.SelectedIndex = 0; } //needs to have the courseID from the MyScores Page and also needs to have the InfoID from the Scores table so it can set it to the right tee TeePicker.ItemsSource = App.Database.GetCourseTees(mp.GetSelectedCourseID()); TeePicker.ItemDisplayBinding = new Binding("DisplayName"); TeePicker.IsEnabled = true; foreach (PickerTee item in TeePicker.ItemsSource) { if (item.InfoID == OriginalScore.InfoID) { TeePicker.SelectedItem = item; } } }
public ScoreClick(MyScores m, DetailedScore SelectedItem) { InitializeComponent(); mp = m; selectedScore = SelectedItem; }