private void buttonTestFlexors_Click(object sender2, RoutedEventArgs e)
        {
            if (!selectedGlove.Connected)
            {
                string           message = "Cannot test flexors. Please establish connection with the device.";
                string           caption = "Glove disconnected";
                MessageBoxButton button  = MessageBoxButton.OK;

                MessageBox.Show(message, caption, button, MessageBoxImage.Error);
                return;
            }
            sw.Restart();


            if (testing)
            {
                testing = false;
                buttonTestFlexors.Content = "Test";
                gloves.getDataReceiver(selectedGlove).fingersFunction -= testFingers;
                tabControl.SelectedIndex = 0;
            }
            else if (this.selectedGlove.GloveConfiguration.GloveProfile.FlexorsMappings.Count > 0)
            {
                testing = true;
                tabControl.SelectedIndex = 1;
                gloves.getDataReceiver(selectedGlove).fingersFunction += testFingers;
                buttonTestFlexors.Content = "Stop";
            }
        }
 private void buttonTest_Click(object sender, RoutedEventArgs e)
 {
     if (testing)
     {
         testing            = false;
         buttonTest.Content = "Test";
         gloves.getDataReceiver(selectedGlove).imu_ValuesFunction -= allIMUValues;
         GridTest.Visibility = Visibility.Hidden;
     }
     else
     {
         testing             = true;
         GridTest.Visibility = Visibility.Visible;
         gloves.getDataReceiver(selectedGlove).imu_ValuesFunction += allIMUValues;
         buttonTest.Content = "Stop";
     }
 }