Esempio n. 1
0
        // TODO: write stop capture method here

        private async void doCountDown()
        {
            currentFolder = await Windows.Storage.KnownFolders.PicturesLibrary.CreateFolderAsync(await this.getNextSnapFolder(), CreationCollisionOption.ReplaceExisting);

            counter = 5;
            this.TimerView.Visibility  = Visibility.Visible;
            this.txtCounter.Visibility = Visibility.Visible;
            this.txtCounter.Text       = counter.ToString();

            DispatcherTimer TextCountDownTrm = new DispatcherTimer();

            TextCountDownTrm.Tick    += TextCountDownTrm_Tick;
            TextCountDownTrm.Interval = new TimeSpan(0, 0, 1);
            TextCountDownTrm.Start();

            txtCounter.RenderTransform = new ScaleTransform();
            CountdownAnim.Begin();
        }
Esempio n. 2
0
        void TextCountDownTrm_Tick(object sender, object e)
        {
            counter--;
            this.txtCounter.Text    = counter.ToString();
            this.txtCounter.Opacity = 1.0;
            CountdownAnim.Begin();

            if (counter <= 0)   // we've hit the timer, stop counting
            {
                DispatcherTimer tmr = (DispatcherTimer)sender;
                tmr.Stop();
                this.txtCounter.Visibility = Visibility.Collapsed;
                this.TimerView.Visibility  = Visibility.Collapsed;

                photoCount = 0;
                DispatcherTimer ShootTimer = new DispatcherTimer();
                ShootTimer.Tick    += ShootTimer_Tick;
                ShootTimer.Interval = new TimeSpan(0, 0, 0, 0, MillisBetweenSnap);
                ShootTimer.Start();
            }
        }