private void clear2_Click(object sender, RoutedEventArgs e) { regexOverride = true; Application.Current.Dispatcher.Invoke(() => { H2Measurement.Clear(); }); H2Measurement.Focus(); regexOverride = false; }
//checkbox unchecked is returning to bluetooth measruements private void checkBox_Unchecked(object sender, RoutedEventArgs e) { regexOverride = true; manualMeasurement = false; Application.Current.Dispatcher.Invoke(() => { H1Measurement.Clear(); H2Measurement.Clear(); H3Measurement.Clear(); }); MessageBox.Show("You are now entering measurements with Bluetooth."); ////// RunCleanUp(); H1Measurement.Focus(); //////// regexOverride = false; }
bool regexOverride = false;//allows usage of text box clear operations to delte old results by not having regex applied to user input private void checkBox_Checked(object sender, RoutedEventArgs e) { regexOverride = true; manualMeasurement = true; Application.Current.Dispatcher.Invoke(() => { H1Measurement.Clear(); H2Measurement.Clear(); H3Measurement.Clear(); }); MessageBox.Show("You are now entering measurements manually.\n\n" + "Please ensure measurements are of 3 decimal place format\n\n" + "For example, 1.43 meters should be inout as 1.430.\n" + "1 meter should be input as 1.000"); ////// RunCleanUp(); H1Measurement.Focus(); /////// regexOverride = false; }