Example #1
0
        private void xWriting_Clicked(object sender, RoutedEventArgs routedEventArgs)
        {
            var prepSegment = new TimerSegment
            {
                Label           = "Work together to plan your essays.",
                SecondaryLabels = new List <string>
                {
                    "You can use your books and devices.",
                    "Each of you must pick a different topic and argue for or against it.",
                    "Take notes on the provided sheet, but do not start writing your essays."
                },
                Duration = xOneDay.IsChecked == true ? new TimeSpan(0, 20, 0) : new TimeSpan(0, 25, 0)
            };

            var writeSegment = new TimerSegment
            {
                Label           = "Write by yourself.",
                SecondaryLabels = new List <string>
                {
                    "Use pen or pencil.",
                    "There is no required format or word count.",
                    "Drawings of alpacas are optional but recommended."
                },
                Duration = xOneDay.IsChecked == true ? new TimeSpan(0, 40, 0) : new TimeSpan(0, 45, 0)
            };

            var reviewSegment = new TimerSegment
            {
                Label           = "Review your essays as a team.",
                SecondaryLabels = new List <string>
                {
                    "Give each other ideas on how to improve them.",
                    "You may not use devices or outside resources during this time.",
                    "You may not finish someone else's essay for them."
                },
                Duration = xOneDay.IsChecked == true ? new TimeSpan(0, 12, 0) : new TimeSpan(0, 15, 0)
            };

            var timerViewModel = new TimerViewModel("Collaborative Writing",
                                                    new List <TimerSegment> {
                prepSegment, writeSegment, reviewSegment
            });

            // now make a new window for the timer (so the kids don't see the controls)
            MakeNewTimerWindow(timerViewModel);
        }
Example #2
0
        private async void MakeNewTimerWindow(TimerViewModel vm)
        {
            var       newView   = CoreApplication.CreateNewView();
            var       newViewId = 0;
            TimerPage timer     = null;
            await newView.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                var frame = new Frame();
                frame.Navigate(typeof(TimerPage), vm);
                Window.Current.Content = frame;
                Window.Current.Activate();
                newViewId = ApplicationView.GetForCurrentView().Id;
                timer     = (TimerPage)frame.Content;
            });

            await ApplicationViewSwitcher.TryShowAsStandaloneAsync(newViewId);

            Frame.Navigate(typeof(RemotePage), timer);
        }
Example #3
0
        private void xChallenge_Clicked(object sender, RoutedEventArgs routedEventArgs)
        {
            var segment = new TimerSegment
            {
                Label           = "Do not sit next to someone from your school!",
                SecondaryLabels = new List <string>
                {
                    "Make sure your ID is filled out correctly.",
                    "Completely fill in all the bubbles.",
                    "You may fill in up to FIVE answers per question."
                },
                Duration = xOneDay.IsChecked == true ? new TimeSpan(0, 45, 0) : xGlobal.IsChecked == true ? new TimeSpan(0, 75, 0) : new TimeSpan(0, 60, 0)
            };

            var timerViewModel = new TimerViewModel("Scholar's Challenge",
                                                    new List <TimerSegment> {
                segment
            });

            MakeNewTimerWindow(timerViewModel);
        }