예제 #1
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            if (e.Parameter is CountdownTime)
            {
                soundPlayer = new SoundPlayer();
                await soundPlayer.InitializeSounds();

                // set current time to start time passed in from previous page
                countdownCurrTime = e.Parameter as CountdownTime;

                // start the timer with the current time
                StartTimer(countdownCurrTime);

                // divide 100 by the total number of minutes to get percentage interval for background animation
                percentageInterval = (100 / ((double)(countdownCurrTime.Minutes * 60) + countdownCurrTime.Seconds));
            }
        }
예제 #2
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            CheckShowAds();

            VisualStateManager.GoToState(this, "Loading", true);

            soundPlayer = new SoundPlayer();

            await soundPlayer.InitializeSounds();

            InitializeControls();

            InitializePresets();

            VisualStateManager.GoToState(this, "Loaded", true);

            // set first preset as the active preset
            SetPresetValues(Presets[0]);

            VisualStateManager.GoToState(this, "LedNormal", true);
        }
예제 #3
0
 protected async override void OnNavigatedTo(NavigationEventArgs e)
 {
     soundPlayer = new SoundPlayer();
     await soundPlayer.InitializeSounds();
 }