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(); } }
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; }
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)); } }