Ejemplo n.º 1
0
 public TrackingReader(Test Test = null)
 {
     db = new EyetrackerEntities(EyetrackerEntities.BuildConnString());
     if (Test != null)
     {
         this.Test = db.Test.FirstOrDefault(t => t.id == Test.id);
     }
 }
 public QuestionnaireWindow(EyetrackerEntities db, Test test, Questionnaire questionnaire)
 {
     InitializeComponent();
     Db = db;
     QuestionnaireAnswer = new QuestionnaireAnswer(test, questionnaire);
     if (test.start_time == null)
     {
         test.start_time = DateTime.Now;
     }
     DataContext = QuestionnaireAnswer;
 }
Ejemplo n.º 3
0
        public MainWindow()
        {
            InitializeComponent();

            LoadTrackingWorker.DoWork             += LoadTracking;
            LoadTrackingWorker.RunWorkerCompleted += LoadTrackingCompleted;

            db = EyetrackerEntities.EyeTrackerDB;

            LoadData();
            DataContext = db;
            LoggingStatus.PostMessage(Severity.Info, String.Format("Total of {0} tests loaded from database.", db.Tests.Count));
        }
        public PresentationWindow(EyetrackerEntities db, Test test) : base()
        {
            InitializeComponent();

            Db   = db;
            Test = test;

            slides = new List <Slide>();
            foreach (Slide s in Test.Test_Definition.Slide.OrderBy(s => s.num))
            {
                slides.Add(s);
            }

            subjName = test.Candidate.personal_code;

            Properties.Settings settings = new Properties.Settings();
            trackingBase = settings.TrackingPathLocal;

            actCaliImg = new BitmapImage(new Uri("..\\Resources\\Calibration.png", UriKind.RelativeOrAbsolute));

            String Ip   = settings.EyetrackerIP;
            int    Port = settings.EyetrackerPort;

            eyeTracker = new EyeTrackingController(Ip, Port);
            eyeTracker.Start();

            Mouse.OverrideCursor   = Cursors.None;
            fixationTimer          = new Timer(1000);
            fixationTimer.Elapsed += hideFixationScreen;

            slideNum = -1;
            NextSlide();


            WindowState = WindowState.Normal;
            WindowStyle = WindowStyle.None;
            Topmost     = true;

            System.Windows.Forms.Screen screen = System.Windows.Forms.Screen.AllScreens.FirstOrDefault(s => !s.Primary);
            if (screen != null)
            {
                Top    = screen.WorkingArea.Top;
                Left   = screen.WorkingArea.Left;
                Width  = screen.WorkingArea.Width;
                Height = screen.WorkingArea.Height;
            }
            Show();
            WindowState = WindowState.Maximized;

            overall.Start();
        }
Ejemplo n.º 5
0
 public NewTest(EyetrackerEntities db)
 {
     InitializeComponent();
     Db   = db;
     Test = new Test {
         Candidate = new Candidate()
     };
     DataContext = Test;
     cbTestDefinition.ItemsSource = db.TestDefinitions;
     if (db.TestDefinitions.Count > 0)
     {
         cbTestDefinition.SelectedIndex = 0;
     }
 }