コード例 #1
0
 private void clear3_Click(object sender, RoutedEventArgs e)
 {
     regexOverride = true;
     Application.Current.Dispatcher.Invoke(() => { H3Measurement.Clear(); });
     H3Measurement.Focus();
     regexOverride = false;
 }
コード例 #2
0
        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;
        }
コード例 #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;
 }