Ejemplo n.º 1
0
 private void NextTestButton_OnClick(object sender, RoutedEventArgs e)
 {
     if (testNumber < Tests.tests.Count)
     {
         TrackerUserControl.SetValue(Tests.tests[testNumber].Blurness, Tests.tests[testNumber].Radius,
                                     750, false, BitmapImages);
         NextTestButton.IsEnabled = false;
         ReadyButton.IsEnabled    = true;
         TrackerUserControl.StopTest(index, Tests.tests[testNumber].Blurness, Tests.tests[testNumber].Radius);
         TrackerUserControl.StopTracking();
         testNumber        += 1;
         StatusEllipse.Fill = Brushes.Red;
     }
     else
     {
         FinishWindow finishWindow = new FinishWindow();
         finishWindow.Show();
         this.Close();
     }
 }
Ejemplo n.º 2
0
 private void ReadyButton_OnClick(object sender, RoutedEventArgs e)
 {
     if (testNumber < Tests.tests.Count)
     {
         TrackerUserControl.StartTest(Tests.tests[testNumber].Name, Tests.tests[testNumber].Blurness,
                                      Tests.tests[testNumber].Radius);
         index             = testNumber + 1;
         TestCount.Content = "Test nr " + index + " av " + Tests.tests.Count;
         var etInfo = InputUserControl.TrackerCombo.SelectedItem as EyeTrackerInfo;
         if (etInfo != null)
         {
             TrackerUserControl.StartTracking(etInfo);
         }
         NextTestButton.IsEnabled = true;
         ReadyButton.IsEnabled    = false;
         StatusEllipse.Fill       = Brushes.GreenYellow;
     }
     else
     {
         FinishWindow finishWindow = new FinishWindow();
         finishWindow.Show();
         this.Close();
     }
 }