//Start Timers to update UI and startCollection timer and data from MeasureLengthDevice. private void StartStopToggle_Checked(object sender, RoutedEventArgs e) { newDevice.StartCollecting(); timer = new DispatcherTimer(); timer.Tick += timer_Tick; timer.Interval = new TimeSpan(0, 0, 1); timer.Start(); startStopToggle.Content = "Stop"; }
private void startButton_Click(object sender, RoutedEventArgs e) { //When the start button is clicked, start collecting data //Enable the stop and getrawdata buttons //Disable the start button so the user cant keep clickin start over and over measureLengthDevice.StartCollecting(); stopButton.IsEnabled = true; getRawDataButton.IsEnabled = true; startButton.IsEnabled = false; }