Ejemplo n.º 1
0
 public PostScorePopup(CourseSelection p, CourseClickPopup c)
 {
     InitializeComponent();
     mp = p;
     cc = c;
     SelectedRoundType.SelectedIndex = 0;
     selectedcourse               = mp.GetSelectedCourse();
     TeePicker.ItemsSource        = App.Database.GetCourseTees(selectedcourse.CourseID);
     TeePicker.ItemDisplayBinding = new Binding("DisplayName");
     TeePicker.IsEnabled          = true;
     ScoreDate.MaximumDate        = DateTime.Today;
 }
Ejemplo n.º 2
0
        private void CourseSelectMenu_ItemSelected(object sender, SelectedItemChangedEventArgs e)
        {
            switch (e.SelectedItemIndex)
            {
            case 0:     //Post a Score
                PopupNavigation.Instance.PushAsync(new PostScorePopup(mp, this));
                break;

            case 1:     //Delete Course
                var selectedCourse = mp.GetSelectedCourse();
                App.Database.DeleteCourse(selectedCourse.PlayedID);
                mp.RefreshCourseList();
                PopupNavigation.Instance.PopAsync();
                break;
            }
        }