Пример #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;
        }
Пример #2
0
        void QuizUpload()
        {
            String QuizID = QuizEntry.Text;

            if (QuizContainer.UploadQuiz(QuizID) == 1)
            {
                DisplayAlert("Alert", "Quiz '" + QuizID + "' succesfully uploaded.", "OK");
            }
            else
            {
                DisplayAlert("Alert", "Unable to upload '" + QuizID + "'.", "OK");
            }
        }
Пример #3
0
        void LoadWeb()
        {
            String loadResult = QuizContainer.LoadWebQuizzes();

            DisplayAlert("Alert", "Web Quizzes Load Result: " + loadResult, "OK");
        }
Пример #4
0
 void LoadLocal()
 {
     QuizContainer.LoadSampleQuiz();
 }