Exemplo n.º 1
0
        private void bt_load_game_Click(object sender, EventArgs e)
        {
            if (lv_courses.SelectedItem == null)
            {
                DisplayAlert("Select a Course", "Please select a Course to Play!", "Ok");
            }
            else
            {
                CoursesManager.LaunchGame();
                GameManager.CurrentGame.IsEnabled    = true;
                GameManager.CurrentGame.UserHandicap = GameManager.UserHandicap;

                foreach (var hole in GameManager.CurrentGame.CourseHoles)
                {
                    hole.HoleScore = 0;
                }

                lv_courses.SelectedItem   = null;
                GameManager.UserHandicap  = 0;
                Shell.Current.CurrentItem = Shell.Current.CurrentItem.Items[3];
            }
        }