Exemplo n.º 1
0
        private void Play()
        {
            Timer.Stop();

            var task = comboTask.SelectedItem as Task;

            if (task == null)
            {
                return;
            }

            CurrentTask     = task;
            CurrentStep     = 0;
            PassedSeconds   = GetCurrentStepSeconds();
            secondShow.Text = PassedSeconds.ToString();

            Timer.Start();
            NotificationManager.ShowToast("Prepare Time is Start!");
        }
Exemplo n.º 2
0
        void Timer_Tick(object sender, object e)
        {
            PassedSeconds--;

            if (PassedSeconds <= 0 && CurrentStep == 0)
            {
                CurrentStep   = 1;
                PassedSeconds = GetCurrentStepSeconds();
                /*Notify Step One Complete*/
                NotificationManager.ShowToast("Prepare Time is End! Response Time Start!");
            }
            else if (PassedSeconds <= 0 && CurrentStep == 1)
            {
                /*Notify Step One Complete*/
                Timer.Stop();
                NotificationManager.ShowToast("Response Time End!");
            }

            Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                                () =>
            {
                secondShow.Text = PassedSeconds.ToString();
            });
        }