예제 #1
0
 //Clean up to original state expecting first measurement
 public void RunCleanUp()
 {
     arrayMeasurements[3, 0]     = null;
     arrayMeasurements[3, 1]     = null;
     arrayMeasurements[3, 2]     = null;
     arrayMeasurements[3, 3]     = null;
     arrayMeasurements[3, 4]     = null;
     arrayMeasurements[3, 5]     = null;
     arrayMeasurements[1, 1]     = null;
     arrayMeasurements[2, 1]     = null;
     arrayMeasurements[3, 1]     = null;
     arrayMeasurements[1, 6]     = null;
     arrayMeasurements[2, 6]     = null;
     arrayMeasurements[3, 6]     = null;
     H1Measurement.IsEnabled     = true;
     H2Measurement.IsEnabled     = true;
     button.IsEnabled            = true;
     button.Visibility           = Visibility.Visible;
     textBlock6.Visibility       = Visibility.Hidden;
     textBlock5.Visibility       = Visibility.Hidden;
     H3Measurement.Visibility    = Visibility.Hidden;
     button1.Visibility          = Visibility.Hidden;
     textBlock4_Copy1.Visibility = Visibility.Hidden;
     clear1.IsEnabled            = true;
     clear2.IsEnabled            = true;
     clear3.Visibility           = Visibility.Hidden;
     H3Measurement.IsEnabled     = false;
     H1Measurement.Focus();
     previousInput  = "";
     previousInput1 = "";
     previousInput2 = "";
 }
예제 #2
0
 private void clear1_Click(object sender, RoutedEventArgs e)
 {
     clearIsClicked = true;
     regexOverride  = true;
     Application.Current.Dispatcher.Invoke(() => { H1Measurement.Clear(); });
     H1Measurement.Focus();
     regexOverride = false;
 }
예제 #3
0
 //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;
 }
예제 #4
0
 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;
 }