private void continueToVideo_Tapped(object sender, TappedRoutedEventArgs e)
 {
     disableUi();
     mediaPlayerPage.loadVideo(parameters.Off, MediaPlayerPage.VIDEO_STATE.NO_LOOP, () => {
         mediaPlayerPage.navigateTo(typeof(PageH));
     });
 }
 private void PageNoCustomerLoop_Loaded(object sender, RoutedEventArgs e)
 {
     mediaPlayerPage = Utils.Utils.FindParent <MediaPlayerPage>(this);
     if (mediaPlayerPage.currentPlayingVideo == NO_CUSTOMER_LOOP)
     {
         return;
     }
     mediaPlayerPage.loadVideo(NO_CUSTOMER_LOOP, MediaPlayerPage.VIDEO_STATE.LOOP);
 }
        private void PageA_Loaded(object sender, RoutedEventArgs e)
        {
            mediaPlayerPage = Utils.Utils.FindParent <MediaPlayerPage>(this);

            if (mediaPlayerPage.currentPlayingVideo == A)
            {
                mediaPlayerPage.setOnVideoEnded(() => showContinue());
                return;
            }
            mediaPlayerPage.loadVideo(A, MediaPlayerPage.VIDEO_STATE.NO_LOOP, () => showContinue());
        }
        private void PageGLoop_Loaded(object sender, RoutedEventArgs e)
        {
            mediaPlayerPage = Utils.Utils.FindParent <MediaPlayerPage>(this);
            mediaPlayerPage.loadVideo(G_LOOP, MediaPlayerPage.VIDEO_STATE.LOOP);

            Task.Delay(2000).ContinueWith(async t =>
            {
                await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
                {
                    enableUi();
                });
            });
        }
        private void acceptUser()
        {
            Storyboard storyboard = this.Resources["ImageFadeOut"] as Storyboard;

            storyboard.Completed += (_1, _2) => navigateForward();
            mediaPlayerPage.loadVideo(PageA.A, MediaPlayerPage.VIDEO_STATE.NO_LOOP);

            Task.Delay(200).ContinueWith(async t =>
            {
                await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
                {
                    storyboard.Begin();
                });
            });
        }
 private void PageGOnOff_Loaded(object sender, RoutedEventArgs e)
 {
     mediaPlayerPage = Utils.Utils.FindParent <MediaPlayerPage>(this);
     mediaPlayerPage.loadVideo(parameters.On, MediaPlayerPage.VIDEO_STATE.NO_LOOP, () => { showUi(); });
 }
 private void PageGBack_Loaded(object sender, RoutedEventArgs e)
 {
     mediaPlayerPage = Utils.Utils.FindParent <MediaPlayerPage>(this);
     mediaPlayerPage.loadVideo(G_BACK, MediaPlayerPage.VIDEO_STATE.NO_LOOP, () => showContinue());
 }
 private void PageH_Loaded(object sender, RoutedEventArgs e)
 {
     mediaPlayerPage = Utils.Utils.FindParent <MediaPlayerPage>(this);
     mediaPlayerPage.loadVideo(H_BACK, MediaPlayerPage.VIDEO_STATE.NO_LOOP, () => { goToGLoop(); });
 }