Example #1
0
        public QuizHome()
        {
            if (QuizContainer.Instance.Count() == 0) // If no quiz data has currently been loaded, attempt to load the local sample quizzes
            {
                if (QuizContainer.LoadSampleQuiz() == 1)
                {
                    DisplayAlert("Alert", "Local Quizzes Succesfully Loaded", "OK");
                }
                else
                {
                    DisplayAlert("Alert", "Unable to load quizzes...", "OK");
                }
            }

            ActiveQuizzes = QuizContainer.Instance;

            Grid QuizViewGrid = BuildOptionsView(); //Instantiate and get the Grid view containing the of quiz options.

            var scrollView = new ScrollView();

            StackLayout pageStack = new StackLayout()
            {
                HorizontalOptions = LayoutOptions.StartAndExpand
            };

            pageStack.Children.Add(QuizViewGrid);

            scrollView.Content = pageStack; //enables Scroll functionality

            Content = scrollView;
        }
Example #2
0
 void LoadLocal()
 {
     QuizContainer.LoadSampleQuiz();
 }