Пример #1
0
        private void calibration_Click(object sender, EventArgs e)
        {
            /*
             * Browsing for eye trackers or selecting an eye tracker with known address.
             * Establishing a connection with the eye tracker.
             * Running a calibration procedure in which the eye tracker is calibrated to the user.
             * Setting up a subscription to gaze data, and collecting and saving the data on the computer running the application.In some cases, the data is also shown live by the application.
             */

            var eyeTrackers = EyeTrackingOperations_FindAllEyeTrackers.Execute(this);

            while (eyeTrackers.Count < 1)
            {
                System.Threading.Thread.Sleep(2000);
                eyeTrackers = EyeTrackingOperations_FindAllEyeTrackers.Execute(this);
            }
            var eyeTracker = eyeTrackers[0];


            IEyeTracker_GazeOutputFrequencies.Execute(eyeTracker);
            label_pupil.Text = "eyetracker frequency: " + m_eyetrackerfrequency.ToString() + " Hz";

            CallEyeTrackerManager.Execute(eyeTracker);

            IEyeTracker_GazeDataReceived.Execute(eyeTracker, this);
        }
Пример #2
0
        /*
         * private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
         * {
         *  // Click on the link below to continue learning how to build a desktop app using WinForms!
         *  System.Diagnostics.Process.Start("http://aka.ms/dotnet-get-started-desktop");
         *
         * }
         * private void button1_Click(object sender, EventArgs e)
         * {
         *  MessageBox.Show("Thanks!");
         * }
         */
        private void button2_Click(object sender, EventArgs e)
        {
            /*
             * Browsing for eye trackers or selecting an eye tracker with known address.
             * Establishing a connection with the eye tracker.
             * Running a calibration procedure in which the eye tracker is calibrated to the user.
             * Setting up a subscription to gaze data, and collecting and saving the data on the computer running the application.In some cases, the data is also shown live by the application.
             */
            //GenerateRecordingFile();

            var eyeTrackers = EyeTrackingOperations_FindAllEyeTrackers.Execute(this);

            while (eyeTrackers.Count < 1)
            {
                System.Threading.Thread.Sleep(2000);
                eyeTrackers = EyeTrackingOperations_FindAllEyeTrackers.Execute(this);
            }
            var eyeTracker = eyeTrackers[0];

            CallEyeTrackerManager.Execute(eyeTracker);

            IEyeTracker_GazeDataReceived.Execute(eyeTracker, this);
        }