private void clear3_Click(object sender, RoutedEventArgs e) { regexOverride = true; Application.Current.Dispatcher.Invoke(() => { H3Measurement.Clear(); }); H3Measurement.Focus(); regexOverride = false; }
private void repositionTimer_Tick(object sender, EventArgs e) { var timer = sender as DispatcherTimer; if (timer == null) { return; } if (isThirdMeasurement == false) { waiting.Visibility = Visibility.Hidden; H2Measurement.IsEnabled = true; H1Measurement.IsEnabled = true; clear1.IsEnabled = true; clear2.IsEnabled = true; button.IsEnabled = true; Keyboard.Focus(H2Measurement); } else { waiting3rdMeasurement.Visibility = Visibility.Hidden; clear1.IsEnabled = false; clear2.IsEnabled = false; button.Visibility = Visibility.Hidden; H1Measurement.IsEnabled = false; H2Measurement.IsEnabled = false; textBlock6.Visibility = Visibility.Visible; textBlock5.Visibility = Visibility.Visible; H3Measurement.Visibility = Visibility.Visible; button1.Visibility = Visibility.Visible; textBlock4_Copy1.Visibility = Visibility.Visible; clear3.Visibility = Visibility.Visible; H3Measurement.IsEnabled = true; H3Measurement.Focus(); isThirdMeasurement = false;//Must reset so first to measurements can be re-taken } checkBox.IsEnabled = true; timer.Stop(); repositionTimer = null; }