예제 #1
0
        private void appBarButton_Click(object sender, RoutedEventArgs e)
        {
            if (this.Frame.CanGoBack)
            {
                if (Atimer != null)
                {
                    Atimer.Cancel();
                }
                if (Gtimer != null)
                {
                    Gtimer.Cancel();
                }
                if (Vtimer != null)
                {
                    Vtimer.Cancel();
                }
                if (Ctimer != null)
                {
                    Ctimer.Cancel();
                }
                if (Ftimer != null)
                {
                    Ftimer.Cancel();
                }
                if (Htimer != null)
                {
                    Htimer.Cancel();
                }

                this.Frame.GoBack();
            }
        }
예제 #2
0
        private void btnStop_Click(object sender, RoutedEventArgs e)
        {
            if (Atimer != null)
            {
                Atimer.Cancel();
            }
            if (Gtimer != null)
            {
                Gtimer.Cancel();
            }
            if (Vtimer != null)
            {
                Vtimer.Cancel();
            }
            if (Ctimer != null)
            {
                Ctimer.Cancel();
            }
            if (Ftimer != null)
            {
                Ftimer.Cancel();
            }
            if (Htimer != null)
            {
                Htimer.Cancel();
            }

            combox.IsEnabled   = true;
            combox2.IsEnabled  = true;
            btnStart.IsEnabled = true;
            btnStop.IsEnabled  = false;
        }
예제 #3
0
        private async void Flash_Timer_Tick(ThreadPoolTimer timer)
        {
            TestCount++;

            flashPin112.Write(GpioPinValue.High);
            await Task.Delay(3000);

            flashPin112.Write(GpioPinValue.Low);

            if (TestCount >= TestMaxCount)
            {
                Ftimer.Cancel();
                TestCount = 0;
                Htimer    = ThreadPoolTimer.CreatePeriodicTimer(AS7000HRM_Timer_Tick, TimeSpan.FromMilliseconds(2000));
            }
        }